Re: [whatwg/dom] Side effects due to tree insertion or removal (script, iframe) (#808)

> Are there any other side effects of interest, or is that it?

That is one of the open questions, yes.

> For the script and unload cases, is the goal really to make script get executed after insertion and make unload fire after remove?

I believe the intent is to define exactly _when_ during the insertion or removal the side effects happen.  For example, if you insert a subtree into the DOM that contains two `<script>` tags, we need to define when exactly those run and what the state of the DOM looks like when they do.  Right now the spec is not very clear on that.

> For the sync load event case

Please see https://github.com/whatwg/html/issues/4965 for previous discussion on that topic.  Your fears are not unjustified, but we still need to figure out how to spec something that is web-compatible (the current spec is not, afaict) and then get everyone to converge on that behavior.

And again, if the behavior here ends up "sync load event", then you have to define exactly when it fires.  Again, consider inserting a subtree with several iframes and script tags in it; the precise order of all the script executions and the DOM state they see needs to be defined.

-- 
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/808#issuecomment-692474619

Received on Tuesday, 15 September 2020 05:32:47 UTC