-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meta: a list of side effects that would be impacted by state-preserving move #1270
Comments
It's already easy to fail behind MutationRecords order (added VS removed, which to check first? I check removed first and update the logic synchronously for libraries which goal is to reflect connected and disconnected behavior) so this would be awesome to tackle and I see only two ways to do so:
To be honest, this logic could be easily polyfilled too by checking the
That would be the least surprise and fully backward compatible so I am overly 👍 with the movedCallback idea and its defaulting to current behavior: disconnected + connected This helps Web Components libraries authors to migrate while browsers adoption increase so it feels like a no-brainer to me and I hope it will be welcomed by others too. |
I believe this would also affect being-rendered, whose exhaustive implications I am not sure.
Footnotes |
Thanls, added these! |
I created a demo that tries to capture all these scenarios: https://state-preserving-atomic-move.glitch.me |
Another one that came to my mind from whatwg/html#10521, which is more a direct consequence of not reloading the iframes anymore: in 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. It seems that the current implementation in Chrome (weirdly) ignores the move even outside of the task: https://jsfiddle.net/vr7f958d/ |
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. Second:
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) than actual DOM node order. But that doesn't seem to be unique to |
The thing that
Interesting that this "bug" can be observed even today, still I think that |
What is the issue with the DOM Standard?
In support of #1255, this issue tries to capture the exhaustive list of behaviors that would be impacted by an state-preserving atomic move operation (e.g.
element.moveBefore()
. It is based on references to insertion steps and removing steps.Potentially skipped side effects
Potentially modified side effects
Reflection
movedCallback
, that has a default to calldisconnectedCallback
andconnectedCallback
?Noops
The text was updated successfully, but these errors were encountered: