Re: [w3c/webcomponents] Generic programs can't reliably use/manipulate documents via the DOM (#640)

>>> It is a waste of implementers' time and effort to each discover the limited access and develop a non-standard workaround.
>>
>> Why is not being able to access a shadow tree's content considered a limitation and something that requires a workaround? This isn't really a refutable but rather an opinion.
>
> If useful programs can't be written to function as intended, that seems like a limitation. Especially if they could be before. Is it not a limitation that a developer can't write a keyboard shortcut library of the kind I described as above?

Would you argue that private variables in languages like C++ and Java are limitations that prevent useful programs to be written because other code can't access those states and implement useful programs?

Or would you argue that the canvas is a limitation because it won't allow the same library to provide keyboard shortcuts into text drawn in the canvas?

> >>  * The protection that the component developer is given from the document's author are illusory.
> >
> > Illusory as in they can work around by overriding `Element.prototype.attachShadow`, or any other method in the same global? That is the limitation of the ECMAScript, not DOM. If ECMAScript provided a way to get a separate realm (and its own global object), or had a reliable way to get the original builtin functions, the protection would not be illusory.
>
> This is the whole point of the closed shadow DOM though, no? Either the DOM is important for multiple contexts, in which case they may not have document awareness and need shadow DOM access to behave correctly with custom elements, or they're not, in which case they're embedded in the document, use ECMAScript and the protection is illusory.

There is a discussion for private states in ECMAScript on track, and we've been discussing about the fully isolated components for years now.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/640#issuecomment-301206657

Received on Friday, 12 May 2017 23:20:48 UTC