3 <script src=
"../../resources/js-test.js"></script>
6 <div id=
"frames"></div>
7 <script type=
"text/javascript">
8 function handleEvent(event
) {
9 testPassed("Event is correctly dispatched");
12 var frame1
= document
.createElement("iframe");
13 document
.getElementById("frames").appendChild(frame1
);
14 frame1
.contentDocument
.body
.addEventListener("click", handleEvent
);
16 var frame2
= document
.createElement("iframe");
17 document
.getElementById("frames").appendChild(frame2
);
18 frame2
.contentDocument
.body
.addEventListener("click", handleEvent
);
20 document
.getElementById("frames").removeChild(frame1
);
22 frame2
.contentDocument
.body
.click();