- From: Dominic Farolino <notifications@github.com>
- Date: Wed, 14 Aug 2024 04:27:00 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/issues/1270/2288494309@github.com>
> in [update the rendering](https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering) the list of documents that share the same container document are supposed to be in tree order. Currently that order can't change during this task, with atomic moves, it could be changed anywhere during the task. First, I'm not really sure that the ordering can change _anywhere during the task_ in a way that it couldn't before our API. `moveBefore()` doesn't really introduce that kind of ability, if I understand your point correctly. Second: > It seems that the current implementation in Chrome (weirdly) ignores the move even outside of the task: https://jsfiddle.net/vr7f958d/ Yes it seems that Chromium is wrong here. Basically, it seems like the order in which rAF callbacks are dispatched on same-event-loop same-parent-document-rooted iframes is based on frame insertion order (something closer [to this](https://html.spec.whatwg.org/multipage/nav-history-apis.html#windowproxy-getownproperty:~:text=Sort%20children%20in%20ascending%20order,%20with%20navigableA%20being%20less%20than%20navigableB%20if%20navigableA%27s%20container%20was%20inserted%20into%20W%27s%20associated%20Document%20earlier%20than%20navigableB%27s%20container%20was)) than actual DOM node order. But that doesn't seem to be unique to `moveBefore()`. I think the same inconsistency is observable with `insertBefore()` or any other classic method of insertion. Consider https://jsfiddle.net/6xsdc3qr/2/, which shows the mismatch in ordering between Chrome and the spec, for iframes whose DOM node order does not match their insertion order. WebKit agrees with Chromium in this example, by the way, so I think this is a legacy problem, and something generally unrelated to `moveBefore()`. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/1270#issuecomment-2288494309 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/1270/2288494309@github.com>
Received on Wednesday, 14 August 2024 11:27:04 UTC