[webcomponents]: Making Shadow DOM Subtrees Traversable

Hi folks!

While you are all having good TPAC fun, I thought I would bring this
bug to your attention:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=19562

There's been several comments from developers about the fact that
Shadow DOM encapsulation is _too_ well-sealed for various long tail,
but important use cases. In other words, the information that could be
accessible (no security concerns, for example) is not. One has to use
hacks to get at the truth.

Here's a simple strawman (copied from bug for easy reading):

1) There's a 3-position switch on each shadow DOM subtree: public,
private, isolated.

2) There's a mechanism in place to flip this switch (specifics TBD)

3) the element.shadowRoot property points to the top of the tree
stack, or null if the subtree at the top is in "private" or
"isolated" setting.

4) <shadow>.olderSubtree points to the older subtree in the stack or
null if the older subtree is in "private" or "isolated" setting.

5) ShadowRoot.host points to the shadow host or null, if the subtree
is in "private" or "isolated" setting.

6) The "isolated" setting essentially means that there's a new
document and scripting context for this shadow subtree (specifics
TBD). Watch https://www.w3.org/Bugs/Public/show_bug.cgi?id=16509 for progress.

Comment here or on bug.

:DG<

Received on Wednesday, 31 October 2012 23:03:25 UTC