Closed Bug 1466756 Opened 7 years ago Closed 7 years ago

<slots /> doesn't work in XML document

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox62 --- affected

People

(Reporter: timdream, Unassigned)

References

()

Details

STR: 1. Load the URL 2. Open DevTools and do document.documentElement.firstChild.attachShadow({mode:'open'}).innerHTML = '<slot />' which attaches a shadow root on the <div> and put "<slot />" into its innerHTML. Expected: 1. <span> is rendered inside the Shadow DOM because there is a <slot />. Actual: 1. It didn't and the page is blank. Note: I am sure the same HTML document works, like data:text/html,<body><div><span>cheese</span></div></body> with document.body.firstChild.attachShadow({mode:'open'}).innerHTML = '<slot />'
It works if you do: > document.documentElement.firstChild.attachShadow({mode:'open'}).innerHTML = '<slot xmlns="http://www.w3.org/1999/xhtml"/>'
Nice catch! Thanks.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.