W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2014

RE: Fallout of non-encapsulated shadow trees

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Tue, 1 Jul 2014 22:26:40 +0000
To: Maciej Stachowiak <mjs@apple.com>, Anne van Kesteren <annevk@annevk.nl>
CC: WebApps WG <public-webapps@w3.org>
Message-ID: <1404253600941.39461@domenicdenicola.com>
From: Maciej Stachowiak <mjs@apple.com>

> Web Components as currently designed cannot explain the behavior of any built-in elements (except maybe those which can be explained with CSS alone).

Unfortunately this is a hard problem that nobody has even sketched a solution to.

>From what I remember, you were arguing for some kind of soft encapsulation, which could be broken by e.g. overwriting Object.getOwnPropertyDescriptor, window.Number, Node.prototype.getAttribute, or anything else potentially useful that someone would use in implementing their elements. (I think it was called "type X" encapsulation in various discussions; I do not remember what X was.) But soft encapsulation is just as useless for explaining the platform as no encapsulation at all.

True encapsulation, wherein each element gets some kind of isolated world in which to implement itself, is much harder. Blink-in-JS [1] accomplishes something along these lines, but does not leverage custom elements, shadow DOM, or the like, and essentially works by redirecting through a WebIDL binding layer. Perhaps we can draw inspiration from there.

[1]: https://docs.google.com/a/google.com/presentation/d/1XvZdAF29Fgn19GCjDhHhlsECJAfOR49tpUFWrbtQAwU/edit
Received on Tuesday, 1 July 2014 22:27:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:26 UTC