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

>> Because otherwise pages would start depending on the implementation details of components.
>
> I'm still not horrified by this. Sometimes this is useful and/or necessary.

The problem is that we've already seen a [similar problem with the shadow piercing combinator](https://github.com/w3c/webcomponents/wiki/Shadow-piercing-Combinators-in-the-Wild).

>> It's possible, for example, for a graphing component to be implemented using SVG in one iteration and canvas in another. If page's code ever depended on the component using SVG, then the page would break when the component's version gets updated and it starts using canvas instead of SVG.
>
> If a page breaks, is it not an issue for the page's author, rather than the component developer?

The unfortunate reality is that library and framework authors would have to worry about those dependency. We deal with those issues all over the place in AppKit and UIKit or even WebKit / WebKit2 themselves embedded in other applications, and it imposes serious constrains on what we can and cannot change in our implementations.

And there is evidence after evidence that this is an issue throughout the industry as I've already enumerated a few.

>> However, it's very important for the authors of each component to understand that doing so results in its shadow tree's structure being dependent by its users.
>
> If a page depends on its internals, then they've taken that risk that updates will break things. It's their decision and their issue. I'm astounded that this position is controversial.

The problem is that it quickly becomes library & framework author's problem once enough websites decide to take that risk.

>> Ultimately, page authors have the power not to use a component which doesn't expose its shadow tree, or demand that they provide some API to mess with component's shadow tree.
>
>So you would prefer page authors to beg component developers instead of making the decision themselves?

Yes. They don't even have to beg. Don't use a badly written component, or a component you don't like. Nobody is forcing you to use a component that you don't like so much that you want to go in & modify its shadow tree.

>> Either case, we don't believe we should give the unilateral power to users of components to decide whether it's okay to intrude into components' shadow tree or not.
>
> Why can the component decide to opt them in or out of protections, but the page author themself cannot? The power dynamics of the current situation are really unusual, and don't seem to have any real advantages

Because they're the one writing a component? If the license allows, page author can just copy / fork the component and modify its script not to use a shadow tree or make it use an open shadow tree; or better yet, directly make necessary changes desired on a particular website.

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

Received on Wednesday, 17 May 2017 21:46:29 UTC