- From: Anne van Kesteren <notifications@github.com>
- Date: Mon, 19 Feb 2018 15:11:09 +0000 (UTC)
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 19 February 2018 15:11:33 UTC
Oh joy, if I change things to ``` <!DOCTYPE html> <script> var s1 = document.createElement("script"); s1.textContent = "w(1 + ' ' + document.head.childElementCount); document.head.removeChild(s2)" var s2 = document.createElement("script"); s2.textContent = "w(2 + ' ' + document.head.childElementCount + ' ' + s2.parentNode)" var df = document.createDocumentFragment(); df.appendChild(s1); df.appendChild(s2) document.head.appendChild(df) </script> ``` _s2_ will not execute in Chrome and Edge, but does execute in Firefox. Safari will throw an error for _s1_ because in Safari _s2_ is not in the tree yet when _s1_ executes. So maybe another thing that's needed here is that `script` elements without parent do not execute? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/575#issuecomment-366721142
Received on Monday, 19 February 2018 15:11:33 UTC