3 ms·
Imagine you had a chat, and 30 videos in the chat. 30 play buttons 30 vulume sliders 30 pause buttons Etc That's a lot in the DOM. So intead you put the html
by tomkinson 8y ago
Imagine you had a chat, and 30 videos in the chat.
30 play buttons
30 vulume sliders
30 pause buttons
Etc
That's a lot in the DOM.
So intead you put the html5 video player components in shadowDOM and reference as needed. Only have them once then.
- sametmax 8y agoBut they don't have the same state. Some of them are half run. Some of them have sound off. Some are paused or playing. One is selected. Is the state separated from structure ?
- sime2009 8y agoShadowDOM and the other parts of the web components specs don't do any of that kind of de-duplication which you describe, sorry.