Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML parser does not create custom elements #11071

Closed
annevk opened this issue Feb 25, 2025 · 1 comment
Closed

XML parser does not create custom elements #11071

annevk opened this issue Feb 25, 2025 · 1 comment
Labels
compat Standard is not web compatible or proprietary feature needs standardizing topic: custom elements Relates to custom elements (as defined in DOM and HTML)

Comments

@annevk
Copy link
Member

annevk commented Feb 25, 2025

Apropos of nothing (well, #10854) I was looking at https://html.spec.whatwg.org/#parsing-xhtml-documents and noticed it currently does not deal with custom elements at all.

However, all browsers alert true here:

data:text/xml,<body xmlns='http://www.w3.org/1999/xhtml'><a-b/><script>class ABElement extends HTMLElement {}; customElements.define('a-b', ABElement);alert(document.querySelector('a-b') instanceof ABElement);</script></body>
@annevk annevk added compat Standard is not web compatible or proprietary feature needs standardizing topic: custom elements Relates to custom elements (as defined in DOM and HTML) labels Feb 25, 2025
@domenic
Copy link
Member

domenic commented Feb 26, 2025

When creating DOM nodes representing elements, the create an element for a token algorithm or some equivalent that operates on appropriate XML data structures must be used, to ensure the proper element interfaces are created and that custom elements are set up correctly.

@annevk annevk closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compat Standard is not web compatible or proprietary feature needs standardizing topic: custom elements Relates to custom elements (as defined in DOM and HTML)
Development

No branches or pull requests

2 participants