I have watched a few videos on Shadow DOM as some light viewing. Everyone appears to just ignore this mode. "Just don't make it closed" "Basically it is less flexible and you don't want it closed".
attachShadow( { mode: 'open' } )
Anyone concisely explain what this does?
Is a HTMLVideoElement
an example of a closed Shadow? I believe you can't create a shadow here because one already exists but you cannot access it or has this no relation?
Thanks.
For the difference between closed
and open
mode, look at this answer:
What is the difference between open and closed shadow DOM encapsulation mode?
A <video>
element uses a user-agent shadow DOM. It's a third form of Shadow DOM but it acts as a closed Shadow DOM. About user-agent one, see this question:
How to get element in shadow root with JavaScript?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With