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
:host
const jsdom = require("jsdom") const { JSDOM } = jsdom const dom = new JSDOM(`<!DOCTYPE html>`) const { window } = dom const { document } = window window.customElements.define('x-foo', class extends window.HTMLElement { constructor() { super() const style = document.createElement('style') style.textContent = ':host { color: red }' this.attachShadow({ mode: 'open' }).appendChild(style) } }) const elm = document.createElement('x-foo') document.body.appendChild(elm) console.log(window.getComputedStyle(elm).color) // should log rgb(255, 0, 0)
In JSDOM, this code will log the empty string.
CodePen repro
In the browser, the code above logs rgb(255, 0, 0).
rgb(255, 0, 0)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Basic info:
Minimal reproduction case
In JSDOM, this code will log the empty string.
How does similar code behave in browsers?
CodePen repro
In the browser, the code above logs
rgb(255, 0, 0)
.The text was updated successfully, but these errors were encountered: