This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17085 - [Shadow]: Clarify the effect of <meta http-equiv="…"> in Shadow DOM
Summary: [Shadow]: Clarify the effect of <meta http-equiv="…"> in Shadow DOM
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14978
  Show dependency treegraph
 
Reported: 2012-05-17 04:45 UTC by Dominic Cooney
Modified: 2012-07-20 17:52 UTC (History)
0 users

See Also:


Attachments

Description Dominic Cooney 2012-05-17 04:45:11 UTC
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.)
Comment 1 Dominic Cooney 2012-05-17 04:45:52 UTC
FWIW, in Chrome Canary the illustrated code above has the effect of setting the cookie, which is visible in document.cookie.
Comment 2 Dimitri Glazkov 2012-06-15 22:12:17 UTC
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?
Comment 3 Dominic Cooney 2012-06-18 01:38:05 UTC
(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?
Comment 4 Dimitri Glazkov 2012-07-20 17:52:04 UTC
(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?
Comment 5 Dimitri Glazkov 2012-07-20 17:52:28 UTC
Please reopen if I screwed up.