Re: [whatwg/dom] Declarative Shadow DOM (#831)

> Recall that our position has been that people should be always using closed shadow roots, not open shadow roots.

This quite surprises me. All popular documentation on shadow roots currently says that closed shadow roots are to be avoided.

Here's MDN's shadow DOM tutorial:
https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM


> **Note:** As [this blog post shows](https://blog.revillweb.com/open-vs-closed-shadow-dom-9f3d7427d1af), it is actually fairly easy to work around closed shadow DOMs, and the hassle to completely hide them is often more than it's worth.

The rest of the MDN tutorial exclusively uses open shadow roots.

Google's documentation is even more severe:
https://developers.google.com/web/fundamentals/web-components/shadowdom#closed


Google's discussion of closed shadow roots is in the "Advanced topics" section, in a subsection called "Creating closed shadow roots (should avoid)" and the whole section is basically an argument about why closed shadow roots are bad.

> Here's my summary of why you should never create web components with `{mode: 'closed'}`:

IIRC even some of Apple's publicly facing statements exclusively documented open mode, though I can't find it now. (It would have been in 2016…? WWDC 2016 didn't have a "What's new in Safari" talk that year, apparently.…)

Now that I go looking, your blog post from 2015 is the only documentation I've ever seen recommending closed shadow roots.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/831#issuecomment-671744340

Received on Tuesday, 11 August 2020 05:59:44 UTC