Re: [w3c/webcomponents] Support `>>>` combinator in static profile (#78)

> > There's no need for a component that uses another interactive components to reach into its shadow tree.
>
> I disagree. For full integration tests, I need to click and interact with elements just like the user would. I frequently have form elements, anchors and other interactive elements inside a shadow tree. The alternative is using selenium to click on specific offsets in the viewport - and that is extremely fragile.

But you wouldn't do this with builtin elements. You wouldn't reach into video element's controls and start messing with their buttons because you trust that video element is implemented & tested correctly on its isolation.

>> That should already work. ShadowRoot.prototype.querySelector and ShadowRoot.prototype.querySelectorAll already exist.
>
> It does - but it's very verbose and difficult to work with. Authors want the convenience that the shadow piercing combinator provided. This problem really only exists because selenium locates elements based on query selectors. It's cumbersome to use shadow dom in that environment.

Since what you want in your use case can be easily built as a shim on top of the existing capability, I still don't see why this needs to be implemented in the browser.

-- 
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/78#issuecomment-335040245

Received on Sunday, 8 October 2017 21:33:52 UTC