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 24870 - [Shadow]: HTMLTitleElement shouldn't work in shadow trees
Summary: [Shadow]: HTMLTitleElement shouldn't work in shadow trees
Status: RESOLVED DUPLICATE of bug 22361
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: 2014-02-28 22:27 UTC by Dimitri Glazkov
Modified: 2014-09-23 15:14 UTC (History)
4 users (show)

See Also:


Attachments

Description Dimitri Glazkov 2014-02-28 22:27:12 UTC
This is in Blink implementation, but not in the spec: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/html/HTMLTitleElement.cpp&l=55
Comment 1 Olli Pettay 2014-02-28 23:34:09 UTC
Why blink has that?
I could imagine someone want to override normal <title>.
Also, the less special cases web components stuff has, the better.
Comment 2 Olli Pettay 2014-02-28 23:36:01 UTC
Though, setting document.title becomes a bit odd if title can be
in the shadow dom.
Comment 3 Jonas Sicking (Not reading bugmail) 2014-05-05 22:14:13 UTC
Content in the shadow DOM should by default act "like normal". For a <title> that means that if the Document is in the <title>'s parent chain, and there are no <title>s "ahead of it" in document order, then it affects the Document's title. Otherwise it does not.

Shadow DOM never has a Document in its parent chain, and so it should not affect the Documents title.

If you want to build your own custom <title> element, then you can do that by using the Custom Elements spec and set Document.title.
Comment 4 Jonas Sicking (Not reading bugmail) 2014-05-05 22:15:46 UTC
Also note that we should not set the "in document" flag for Shadow content in Gecko. That has a very random set of effects. What effects it has is very Gecko specific and changes over time depending on how we implement various elements.
Comment 5 Dimitri Glazkov 2014-09-23 15:14:37 UTC

*** This bug has been marked as a duplicate of bug 22361 ***