Shadow DOM thumbnail
Shadow DOM
javascript.info
Shadow tree A DOM element can have two types of DOM subtrees: Light tree – a regular DOM subtree, made of HTML children. All subtrees that we’ve seen in previous chapters were “light”. Shadow tree – a hidden DOM subtree, not reflected in HTML, hidden from prying eyes. Shadow DOM elements: Have the
1 Users
0 Comments
2 Highlights
2 Notes

Top Highlights

  • Shadow tree A DOM element can have two types of DOM subtrees: Light tree – a regular DOM subtree, made of HTML children. All subtrees that we’ve seen in previous chapters were “light”. Shadow tree – a hidden DOM subtree, not reflected in HTML, hidden from prying eyes.
  • Shadow DOM elements: Have their own ids space, Invisible to JavaScript selectors from the main document, such as querySelector, Use styles only from the shadow tree, not from the main document.

Ready to highlight and find good content?

Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.