We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug The output of a custom element tagname in innerHTML is null.
To Reproduce
// repro.js import { Window } from "happy-dom"; const win = new Window(); class myCustomElement extends win.HTMLElement {} win.customElements.define("my-custom-element", myCustomElement); win.document.body.append(new myCustomElement()); console.log(win.document.body.innerHTML);
Running node repro.js outputs:
node repro.js
<null></null>
Expected behavior
<my-custom-element></my-custom-element>
Version:
Additional context Interestingly console.log(win.document.body.firstChild.tagName) outputs MY-CUSTOM-ELEMENT
console.log(win.document.body.firstChild.tagName)
MY-CUSTOM-ELEMENT
The text was updated successfully, but these errors were encountered:
fix: [#1354] Fixes bug where the tag name for custom elements constru…
1c57ecc
…cted using the "new" keyword rendered as <null>
Merge pull request #1357 from capricorn86/1354-incorrect-custom-eleme…
06b556c
…nt-tag-name-in-innerhtml fix: [#1354] Fixes bug where the tag name for custom elements constru…
Thank you for reporting @bavoco! 🙂
There is a fix in now: https://github.com/capricorn86/happy-dom/releases/tag/v14.3.5
Sorry, something went wrong.
capricorn86
Successfully merging a pull request may close this issue.
Describe the bug
The output of a custom element tagname in innerHTML is null.
To Reproduce
Running
node repro.js
outputs:Expected behavior
Version:
Additional context
Interestingly
console.log(win.document.body.firstChild.tagName)
outputsMY-CUSTOM-ELEMENT
The text was updated successfully, but these errors were encountered: