| OLD | NEW |
| 1 <?xml version="1.0"?> | 1 <?xml version="1.0"?> |
| 2 <svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"> | 2 <svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"> |
| 3 <script> | 3 <script> |
| 4 function init() | 4 function init() |
| 5 { | 5 { |
| 6 var script = document.createElementNS("http://www.w3.org/2000/svg", "script"
); | 6 var script = document.createElementNS("http://www.w3.org/2000/svg", "script"
); |
| 7 script.setAttributeNS('http://www.w3.org/1999/xlink', 'href', "does-not-exis
t.js"); | 7 script.setAttributeNS("http://www.w3.org/1999/xlink", "href", "does-not-exis
t.js"); |
| 8 document.documentElement.appendChild(script); |
| 9 // otherDoc's contextDocument is document. |
| 10 var otherDoc = document.implementation.createDocument("", null); |
| 11 otherDoc.adoptNode(script); |
| 12 document.documentElement.appendChild(script); |
| 13 window.top.done(); |
| 14 } |
| 8 | 15 |
| 9 script.onerror = function() { window.top.done(); }; | |
| 10 document.documentElement.appendChild(script); | |
| 11 var contextDoc = window.top.document.implementation.createDocument("", null)
; | |
| 12 contextDoc.adoptNode(document.documentElement); | |
| 13 } | |
| 14 init(); | 16 init(); |
| 15 </script> | 17 </script> |
| 16 </svg> | 18 </svg> |
| OLD | NEW |