Shadow DOM slots, composition thumbnail
Shadow DOM slots, composition
javascript.info
Then the browser performs “composition”: it takes elements from the light DOM and renders them in corresponding slots of the shadow DOM. At the end, we have exactly what we want – a component that can be filled with data. The process of rendering slotted elements inside their slots is called “compos
1 Users
0 Comments
2 Highlights
0 Notes

Top Highlights

  • Then the browser performs “composition”: it takes elements from the light DOM and renders them in corresponding slots of the shadow DOM. At the end, we have exactly what we want – a component that can be filled with data.
  • The process of rendering slotted elements inside their slots is called “composition”. The result is called a “flattened DOM”. Composition does not really move nodes, from JavaScript point of view the DOM is still same.

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.