Re: [webcomponents] Extend the slotting algorithm so that a slot can select an element which doesn't have slot attribute. (#343)

Ok, got it.

And probably something like below introduces same performance and lifecycle issues, like `content select` from v0, doesn't it?

--- 

Input
    NODE, a node
Output
    (nullable) SLOT, a slot to which NODE is assigned.

1. If the parent node of NODE is a shadow host:
 1. Let TREE be the shadow tree that the parent node of NODE hosts
 2. Let NAME be the value of the slot attribute of NODE
 3. If NAME is missing:
   1. Let SLOT be a default slot for TREE if it exists, Otherwise, null
 4. If NAME is the empty string:
     1. Let SLOT be the first slot which _`select` attribute_  matches NODE, If there is none null
 4. Otherwise:
   1. Let SLOT be the most preceding slot in TREE whose slot name is NAME if it exists. Otherwise null.
2. Otherwise:
 1. Let SLOT be null

---
However with such algorithm, we will be able to specify that some nodes are allowed to be distributed, without awareness of shadow DOM structure (slot name), keeping the fully efficient slot selector.

---
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/343#issuecomment-200286690

Received on Wednesday, 23 March 2016 10:29:29 UTC