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
Example code:
const { Window } = require('happy-dom'); const VM = require('vm'); const window = VM.createContext(new Window()); const document = window.document; window.location.href = 'http://localhost:8080'; document.write(` <html> <head> <title>Test page</title> </head> <body> <div> <my-custom-element> <span>Slotted content</span> </my-custom-element> </div> <script> class MyCustomElement extends HTMLElement { constructor() { super(); this.attachShadow({ mode: 'open' }); } connectedCallback() { this.shadowRoot.innerHTML = \` <style> :host { display: inline-block; background: red; } </style> <div><slot></slot></div> \`; } } customElements.define('my-custom-element', MyCustomElement); </script> </body> </html> `); console.log(document.body.querySelector('div').getInnerHTML({ includeShadowRoots: true }));
Expected:
<my-custom-element> <span>Slotted content</span> <template shadowroot="open"> <style> :host { display: inline-block; background: red; } </style> <div><slot></slot></div> </template> </my-custom-element>
Actual:
<my-custom-element> <span>Slotted content</span> </my-custom-element>
The text was updated successfully, but these errors were encountered:
#404@patch: Fixes issue with custom elements not being loaded when de…
94a9aea
…fined after the element tag was added to the DOM.
Merge pull request #406 from capricorn86/task/404-custom-elements-doe…
bb82e7e
…s-not-load-when-defined #404@patch: Fixes issue with custom elements not being loaded when de…
ce324c1
Merge pull request #408 from capricorn86/task/407-github-action-for-r…
a8f9953
…elease-not-working #404@patch: Fixes issue with custom elements not being loaded when de…
capricorn86
Successfully merging a pull request may close this issue.
Example code:
Expected:
Actual:
The text was updated successfully, but these errors were encountered: