This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Presumably, as a <script> tag in Shadow DOM executes and has side-effects on the global state, what is the effect of things like var s = new ShadowRoot(document.head); s.innerHTML = '<meta http-equiv="set-cookie" content="foo=bar">'; on document.cookie? Should these side effects happen? What about <title> and document.title? (Note that document.title has a setter.)
FWIW, in Chrome Canary the illustrated code above has the effect of setting the cookie, which is visible in document.cookie.
Ok, trying to better understand how I should capture this. It seems I have a wording that's close enough: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#html-elements "All other HTML elements in the shadow DOM subtrees must behave as if they were part of the document tree, though scoped to their subtrees." Do I need to add anything else?
(In reply to comment #2) > "All other HTML elements in the shadow DOM subtrees must behave as if they were > part of the document tree, though scoped to their subtrees." Maybe it is Monday morning speaking, but as an implementer, I don’t know if that means the above example should set document.cookie (ie behave as if it were part of the document tree) or not (ie be scoped to its subtree)? Because subtrees don’t have cookies, I guess it is the former, so what does the "scoped to their subtrees" phrase control?
(In reply to comment #3) > (In reply to comment #2) > > "All other HTML elements in the shadow DOM subtrees must behave as if they were > > part of the document tree, though scoped to their subtrees." > > Maybe it is Monday morning speaking, but as an implementer, I don’t know if > that means the above example should set document.cookie (ie behave as if it > were part of the document tree) or not (ie be scoped to its subtree)? Because > subtrees don’t have cookies, I guess it is the former, so what does the "scoped > to their subtrees" phrase control? I made it more clear what the "scoped" means by explicitly referencing the "scoping constraints" (and linking to them). http://dvcs.w3.org/hg/webcomponents/rev/cade79aaed01 What do you think?
Please reopen if I screwed up.