Re: [whatwg/dom] Hook for SVG and HTML script element insertion (#575)

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