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 22412 - [Shadow]: Clarify the interaction with XML Namespace
Summary: [Shadow]: Clarify the interaction with XML Namespace
Status: RESOLVED WORKSFORME
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 22716
  Show dependency treegraph
 
Reported: 2013-06-20 02:21 UTC by Yuta Kitamura
Modified: 2015-04-23 20:55 UTC (History)
1 user (show)

See Also:


Attachments

Description Yuta Kitamura 2013-06-20 02:21:11 UTC
Consider the following code:

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="head">
</head>
<body>
<script><![CDATA[
var shadowRoot = document.getElementById('head').createShadowRoot();
console.log(shadowRoot.namespaceURI);  // What should be printed?

shadowRoot.innerHTML = "<title />";
console.log(shadowRoot.firstChild.namespaceURI);  // How about this one?

document.documentElement.setAttribute('xmlns', 'http://example.com/foobar');
console.log(shadowRoot.firstChild.namespaceURI);  // Does it change?
]]></script>
</body>
</html>

It is unclear from the specification whether XML namespace is derived
over host-shadow boundary. Probably this should be clarified.
Comment 1 Anne 2015-04-23 20:55:25 UTC
This follows from how DocumentFragment and innerHTML work. First prints null I think, second null as well, and you cannot change namespaces.