Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardHTMLdeclarative shadow DOMSingle-choice MCQ

Inside a declarative shadow root, a <style> uses :host selectors and the host has reflected attributes set in the same parsed markup. At the moment the parser materializes the shadow root, which is true about the interaction between declarative shadow DOM and the upgrade of a still-undefined custom element host?

<x-widget loud> <template shadowrootmode="open"> <style>:host([loud]) { font-weight: 700 }</style> <slot></slot> </template> </x-widget> <!-- x-widget defined later via customElements.define -->