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
What happens in these slot/content scenarios? #508
Comments
In general, the slot element contains and only contains matching elements in the tree order. I suggest you test each of your case using Safari Technology Preview or WebKit nightly builds, which supports shadow DOM v1 API: https://webkit.org/downloads/ |
There's no way to serialise a shadow root from HTML (yet) so you can make the following assumptions:
You also make the following assumptions in all scenarios:
Those things accounted for:
|
The order of DOM mutations does not matter. An engine should always react any DOM mutation if it affects the result of slotting. That's our goal. See the details: https://dom.spec.whatwg.org/#mutation-algorithms If you find a case where we are missing in the DOM Standard, please file a bug. |
What is the expected behavior in each of the following cases? In each case, assume "element" is a custom element that (at some point in time) will have a top-level shadow root, "shadow root".
slot=""
attributes, then shadow root added with existing shadow dom (includes named slots).slot=""
attributes.slot=""
attributes).slot=""
attributes.What scenarios have I missed?
The text was updated successfully, but these errors were encountered: