[Bug 22080] [Shadow]: Node should expose there scope so that shared state can be scoped to components.

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

Dominic Cooney <dominicc@chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dominicc@chromium.org

--- Comment #3 from Dominic Cooney <dominicc@chromium.org> ---
The good thing about adding something that returns the ShadowRoot is that it is
easy to write:

if (in document) {
  behave
} else if (in shadow) {
  misbehave
} ...

But it makes it harder to write "do something to my root node"; instead of

elem.treeScope.party();

it is

(elem.containingShadow || elem.document).party();

I think having the shadow root accessor is better because it is very easy to
explain. Otherwise we'll have to put this pop quiz on cereal packets:

What does elem.treeScope return when...
...elem is not in the tree? (null)
...elem is in light DOM? (document)
...elem is in template content? (template document, I guess?)
...elem is in shadow DOM? (Shadow Root)
...elem is in a document fragment? (???)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 21 May 2013 02:20:09 UTC