Need help understanding the Shadow DOM
问题 Reading through articles and tutorials about the Shadow DOM, I came across a description which confused me a bit: "Shadow DOM refers to the ability of the browser to include a subtree of DOM elements into the rendering of a document, but not into the main document DOM tree." So a Shadow tree is not part of the DOM tree? But the browser will still see it and render its contents? 回答1: From the Shadow DOM spec, A document tree is a node tree whose root node is a document. Any element can host