Re: [w3c/webcomponents] Support /deep/ in static profile (bugzilla: 28591) (#78)

> It would be like a `element.querySelectorAll(simple-selector, { good_option_name: true })`, wouldn't it?

Well, there is a subtle semantics difference. We’re essentially checking whether `:matches(selector)` is true or not for each element, and collecting elements that do match so we’re not [scope-matching a selectors string](https://dom.spec.whatwg.org/#scope-match-a-selectors-string) but instead we’re [matching a selector against an element](https://drafts.csswg.org/selectors-4/#match-a-selector-against-an-element) which uses a different scoping object.  This is because using a node from different trees as the scope doesn’t make sense in evaluating a selector as well as for the implementation simplicity.

We’re adopting this API in some Safari code for now, and if this turns out to be useful, we’d make a more refined proposal.

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

Received on Thursday, 8 December 2016 02:45:07 UTC