[Webkit-unassigned] [Bug 246899] DOM api document.adoptNode doesn't assign ownerDocument correctly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 23 02:40:24 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=246899

--- Comment #3 from huocp at me.com ---
(In reply to huocp from comment #2)
> OK, I found an issue without involving adoptNode api.
> 
> create a test.html file with following content
> 
> <!doctype html>
> <html>
> <body>
> <template id="a">
> <p>1</p>
> </template>
> </body>
> </html>
> 
> Open it in Safari 16+.
> Try in console:
> 
> > var d = document.querySelector('#a')
> < undefined
> > d;
> < <template id="a">…</template>
> > d.content
> < Template Content
> > d.content.ownerDocument
> < #document
> > d.content.ownerDocument.documentElement
> < null
> 
> Should not every node in this static html file have ownerDocument pointing
> to the document itself??
> 
> The null ownerDocument.documentElement seems not right for the content of
> HTMLTemplateElement.

Please ignore my previous comment2, just found out all other browsers do the same.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221023/2bbc6694/attachment-0001.htm>


More information about the webkit-unassigned mailing list