Shadow DOM explained.

preview_player
Показать описание
Web components let you create reusable custom components with their functionality encapsulated away from the rest of your code. The way they do this is by using Shadow DOM. Shadow DOM is just like any other DOM element, the only difference being its internal implementation is concealed from the outside world. Because of the Shadow DOM, you get consistently predictable frontends that can be reused across apps. In this video, we take a look at the basic idea behind a Shadow DOM and how to create your own element and attach it to the regular DOM with native javascript.

This video is part of a series where we look at Web components in detail.

🔗Links:

⌚Timestamps
0:00 - Encapsulation
0:38 - DOM
1:01 - Shadow DOM
2:53 - Creating a shadow DOM
7:21 - Outro

🧑‍💻Other playlists:

Socials

#dom #shadowdom #encapsulation #webcomponents
Рекомендации по теме
Комментарии
Автор

Excellent video. Needs to be shared more since I never learned this in school.

Vietnamkid