[Bug 22080] New: [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

            Bug ID: 22080
           Summary: [Shadow]: Node should expose there scope so that
                    shared state can be scoped to components.
    Classification: Unclassified
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Component Model
          Assignee: dglazkov@chromium.org
          Reporter: rafaelw@chromium.org
        QA Contact: public-webapps-bugzilla@w3.org
            Blocks: 14978

It's not hard to imagine collection of elements working together and looking
for each other within the same context.

ShadowRoot has getElementById and querySelectorAll on it, partially for this
purpose.

Obviously, nodes can always walk up to the root element and inspect it to see
if it's a document or ShadowRoot.

I propose that node should expose some time of treeScope property which is
trivial checked. The C++ impl may walk up itself, and that's fine.

My main concern is components will be littered with implementations of
findRoot(), or more likely, component authors scope shared state globally,
either via window or document.

I.e. The main motivation would be encouraging proper encapsulation. If
implementations can return the answer in constant time, that's just a bonus.

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

Received on Saturday, 18 May 2013 00:15:58 UTC