Bug 271645
Summary: | Declarative shadow DOM does not work for XHTML | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jonathan Heathcote <mail> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | cdumez, rniwa, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | Other | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 148695 |
Jonathan Heathcote
Browser: Epiphany 45.3 on Arch Linux.
The Declarative shadow DOM function does not work for XHTML documents (though it does for plain HTML ones).
# Steps to reproduce:
Paste the following XHTML snippet into the address bar:
data:application/xhtml+xml,<div xmlns="http://www.w3.org/1999/xhtml"><template shadowrootmode="open">OpenDeclarativeShadowDOMsupported</template></div>
# Actual results:
An empty page is shown (and the developer tool DOM tree shows the <template> element is not removed, the template contents aren't moved into the parent and no shadow DOM is created.
# Expected results:
I would have expected the same (working) behaviour we see for equivalent HTML documents (see snippet below):
data:text/html,<div><templateshadowrootmode="open">OpenDeclarativeShadowDOMsupported</template></div>
This shows "OpenDeclarativeShadowDOMsupported" when opened in a browser.
# Other browsers
The same bug also appears to effect:
* Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1887436
* Chromium: https://issues.chromium.org/issues/330967152
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/125716107>
Sam Sneddon [:gsnedders]
As per the Chromium bug, this is intended behaviour: specific shadow DOM treatment requires changes to the parser, and the XML parser doesn't do this.
The discussion on the Chromium bug has ended up with https://github.com/whatwg/html/issues/10237 against the HTML spec, and it probably makes sense to keep the discussion there.