- From: Trey Shugart <notifications@github.com>
- Date: Tue, 31 May 2016 17:57:10 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc:
- Message-ID: <w3c/webcomponents/issues/508/222864422@github.com>
There's no way to serialise a shadow root from HTML (yet) so you can make the following assumptions: - The element will exist before its shadow root is created - The element may, or may not, have light DOM when the shadow root is created - The shadow root will be created without any slots (i.e. slots will always be added after it's created) You also make the following assumptions in all scenarios: - All nodes added to a shadow host become light DOM and are reported by `childNodes` - Nodes added to a shadow host may or may not be slotted (i.e. appear in the composed tree) - Slots are slotted in tree order Those things accounted for: - When you add a shadow root, the light DOM has nowhere to be slotted yet and will not be in the composed tree - When you add a slot to the shadow root (by any means, including `innerHTML`) it will run the slotting algorithm if any light DOM exists - When you add light DOM, the slotting algorithm is run on the new node. If it cannot be slotted, it's still a child of the host, but does not appear in the composed tree. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/508#issuecomment-222864422
Received on Wednesday, 1 June 2016 00:57:41 UTC