RE: Fallout of non-encapsulated shadow trees

From: Brendan Eich [mailto:brendan@secure.meer.net] 

> That is a false idol if it means no intermediate steps that explain some but not all of the platform.

Sure. But I don't think the proposed type 2 encapsulation explains any of the platform at all. (Just as per Maciej's email from Monday, the existing shadow DOM spec doesn't explain any of the platform either.)

> Sorry, I'm confused. What do we have now, already, among top browsers that is "good"? Or do you mean prospective stuff? Because among interoperating browsers, AFAIK we do not have any XBL2 or Shadow DOM or other such, after all these years.

I am not sure of your definition of prospective and top browsers, but according to https://jonrimmer.github.io/are-we-componentized-yet/ and linked issues, Chrome/Opera is shipping and Firefox is shipping behind a flag. And by shipping, I mean shipping the current shadow DOM spec, which I consider "good."

(Although, https://bugzilla.mozilla.org/showdependencytree.cgi?id=811542&hide_resolved=1 shows that Firefox has lots of outstanding bugs, so I can't really say how close they are to unflagging.)

> Could you enumerate the three versions (in any sense) of web components in the worst case you cite above?

Sure. They would be:

1. What is being shipped now/the current shadow DOM spec
2. A version of it that gives soft encapsulation
3. A version of it that gives true encapsulation, suitable for implementing built-ins

The relative badness of having 1+2+3 vs. just 1+3 is largely a function of what "version" ends up meaning. If it is a small additional flag, no big deal. If it is three separate conceptual models and APIs, bad news.

Received on Wednesday, 2 July 2014 01:06:05 UTC