dom icon indicating copy to clipboard operation
dom copied to clipboard

Cloning of a document does not copy "allow declarative shadow roots"

Open annevk opened this issue 7 months ago • 0 comments

What is the issue with the DOM Standard?

Although it seems to happen in WebKit and Chromium anyway.

https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E.%0A%3Cscript%3E%0Adoc%20%3D%20document.cloneNode(document)%3B%0Adoc.write(%27%3Cdiv%3E%3Ctemplate%20shadowrootmode%3Dopen%3Etest%3C%2Ftemplate%3E%3C%2Fdiv%3E%27)%3B%0Aw(doc.body.firstChild.shadowRoot)%3B%0A%3C%2Fscript%3E

Given that we copy other state this should probably be copied as well.

cc @smaug---- @mfreed7 @rniwa

annevk avatar Apr 07 '25 14:04 annevk