- From: Chad Killingsworth <notifications@github.com>
- Date: Sun, 08 Oct 2017 13:11:38 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Sunday, 8 October 2017 20:12:00 UTC
> Basically, we decided not to write tests that pierce across shadow boundaries.
That falls apart when you have interactive elements in shadow roots (like `<button>`). You end up writing public accessors just to test the component.
Having worked with this a lot (and being the author of a very popular gist on this subject), I don't want the shadow piercing combinator. What I do want is a selector that only works for testing that selects from the current element's shadow root:
```
document.querySelector('custom-element => button');
// Must be currently written as:
document.querySelector('custom-element').shadowRoot.querySelector('button');
```
However most of this could be easily overcome by syntactic sugar or special methods in testing frameworks.
--
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-335034549
Received on Sunday, 8 October 2017 20:12:00 UTC