| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <div id="test-container"><script> |
| 5 var sacrifice; |
| 6 test(() => { |
| 7 let testContainer = document.getElementById('test-container'); |
| 8 let iframe = document.createElement('iframe'); |
| 9 testContainer.appendChild(iframe); |
| 10 let doc = iframe.contentDocument; |
| 11 let script = doc.createElementNS('http://www.w3.org/2000/svg', 'script'); |
| 12 script.type = 'invalid-type'; |
| 13 script.textContent = 'document.body.appendChild(parent.sacrifice)'; |
| 14 sacrifice = document.createElement('div'); |
| 15 script.appendChild(sacrifice); |
| 16 doc.body.appendChild(script); |
| 17 script.type = ''; |
| 18 // adoptNode() calls script.removeNode(sacrifice) internally, and this DOM |
| 19 // mutation kicks the script. |
| 20 document.adoptNode(sacrifice); |
| 21 }, 'Reparenting in removeNode() in adoptNode() should not crash.'); |
| 22 </script> |
| OLD | NEW |