Re: [webcomponents] Difference between composed document and document flat tree (#382)

> Also, does Shadow DOM work without there being a document? 

It should work, although the spec does not mention it clearly. That is the reason I can not define the terminology of *component tree* simply as either a *document tree* or *shadow tree*. I had to introduce the terminology of *fragment tree* and let the definition of *component tree* include a *fragment tree* as workaround.

A *fragment tree* is a node tree whose root node is, such as, the result of "document.createElement() but never inserted into a document".

Unfortunately, the spec has been unclear about this kind of topic. So I have introduced these terminologies recently.

The intention of the current spec is that Shadow DOM should *work* even for a composed tree (of component tree) whose root tree is a fragment tree.

e.g.
- distribution,  e.g. slot.getAssignedNodes() does correctly return the result, resolving the distribution.
- event dispatching - event dispatch go through the shadow tree.

In fact, Blink supports this.
AFAIR, there is no public discussion on this topic.

Thus, it might be worth discussing that we really want to support this or not.
The use case is not clear to me.

@esprehn, @sorvell, could you explain the use case or the reason why we need to calculate distribution for such a *disconnected* composed tree?


---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/382#issuecomment-184700676

Received on Tuesday, 16 February 2016 14:27:35 UTC