|
1 <html> |
|
2 <head> |
|
3 <script> |
|
4 <!-- |
|
5 function listener1() { |
|
6 window.showModalDialog("data:text/html,<script>var maintest = opener.opener; opener.location = 'data:text/html,test'; maintest.end(); window.close();</script>"); |
|
7 } |
|
8 |
|
9 function listener2() { |
|
10 opener.secondListenerDidRun = true; |
|
11 } |
|
12 |
|
13 window.addEventListener("foo", listener1); |
|
14 window.addEventListener("foo", listener2); |
|
15 |
|
16 |
|
17 function fireFoo() { |
|
18 var e = document.createEvent("Events"); |
|
19 e.initEvent("foo", true, true); |
|
20 window.dispatchEvent(e); |
|
21 } |
|
22 //--> |
|
23 </script> |
|
24 </head> |
|
25 <body onload="setTimeout(fireFoo, 0)"> |
|
26 Test for bug 291653 |
|
27 </body> |
|
28 </html> |