I've recently delved into the world of Shadow DOM through some casual video watching. It seems like many people are quick to dismiss this feature, with comments like "Just keep it open" and "It's less flexible when closed."
attachShadow( { mode: 'open' } )
Can someone please explain in simple terms what this piece of code does?
Could an HTMLVideoElement
be considered a closed Shadow? My understanding is that you can't create a new shadow because one already exists, but you're unable to access it. Is there any connection here?
Appreciate any insights. Thanks!