2 <script src=
"../../resources/js-test.js"></script>
5 description('Tests that lookup in inline event handlers keeps references alive');
7 function dispatchClick(element
)
9 var clickEvent
= document
.createEvent('MouseEvent');
10 clickEvent
.initMouseEvent('click', true, false, window
, 0, 0, 0, 0, 0,false, false, false, false, 0, null);
11 element
.dispatchEvent(clickEvent
);
17 var div1
= document
.createElement('div');
19 div1
.setAttribute('onclick', 'result = custom');
21 var div2
= document
.createElement('div');
22 div2
.onclick
= div1
.onclick
;
28 shouldBeEqualToString('result', 'PASS');