Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardHTMLshadow DOM open closedSingle-choice MCQ

`attachShadow` is called twice on the same element: first `{ mode: 'open' }`, then later `{ mode: 'open' }` again on a host that is NOT a custom element and was NOT given a declarative shadow root. What is the result of the second call?

const host = document.createElement('div'); host.attachShadow({ mode: 'open' }); host.attachShadow({ mode: 'open' }); // second call