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

@matthewp 
> I disagree completely @mrmr1993, closed shadow DOMs just give developers the same abilities that built-in elements have. If a new built-in form element were created then Vimium wouldn't work with it either. The solution here is to define an interface to interact with form elements that is generic enough that Vimium and others don't need to special case for every element type. These are the events to listen to changes and the properties to get/set the element's underlying value. There's no reason why if my custom element (with a closed shadow) emitted those events and had the correct properties why Vimium wouldn't just work with those.

There are a bunch of conditions that hold for the standard HTML elements that do not hold for custom elements

1. Their APIs are very rich and standardized. The ways that other parts of the standard can interact with them is well thought through and relatively complete. They provide open, consistent and standardized APIs that allow interaction with them

1. They can (for the most part) be relied upon to support accessibility APIs and keyboard interaction

1. You can implement polyfills and other interactions purely in JavaScript without any limitations

All of these things mean that there are very few (I do not exclude the possibility, but cannot think of any) situations that have not already been identified (and are being worked on) where a document author would legitimately like to look inside and reach inside the shadow DOM.

We cannot predict the ways the shadow DOM spec will be used by developers (just like we could not predict how HTML would be used by developers) and therefore, we cannot claim that the same will even remotely be possible with custom components that use shadow DOM.

-- 
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-302528721

Received on Thursday, 18 May 2017 20:16:41 UTC