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

A page ships server-rendered declarative shadow DOM, then later loads the custom element definition. When the element is upgraded, what happens to the already-attached declarative shadow root, and how does the constructor's `attachShadow` behave?

class HostEl extends HTMLElement { constructor(){ super(); // declarative shadow root already attached by parser this.attachShadow({ mode: 'open' }); } } customElements.define('host-el', HostEl);