| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <body> |
| 4 <script> |
| 5 function init() |
| 6 { |
| 7 var script = document.createElement("script"); |
| 8 script.src = "does-not-exist.js"; |
| 9 script.onerror = function () { window.top.done(); }; |
| 10 document.body.appendChild(script); |
| 11 // otherDoc's contextDocument is document. |
| 12 var otherDoc = document.implementation.createDocument("", "a", null); |
| 13 var divElement = otherDoc.createElement("div"); |
| 14 divElement.appendChild(script); |
| 15 var iframe = document.createElement("iframe"); |
| 16 iframe.appendChild(script); |
| 17 } |
| 18 |
| 19 init(); |
| 20 </script> |
| 21 </body> |
| 22 </html> |
| OLD | NEW |