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

A `<div>` host has `attachShadow({ mode: 'closed' })`. Inside the closed shadow tree is a `<style>` with `:host { display: block }`. A `MutationObserver` is configured with `subtree: true` on the document and observes the host. The component mutates a node INSIDE the closed shadow tree. Does the document-level observer's callback receive that mutation record?

const obs = new MutationObserver(cb); obs.observe(document, { subtree: true, childList: true }); // component code adds a child inside its CLOSED shadow root