- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 19 Mar 2014 12:02:42 -0700
- To: Anne van Kesteren <annevk@annevk.nl>
- Cc: "www-style@w3.org" <www-style@w3.org>, Domenic Denicola <domenic@domenicdenicola.com>
On Wed, Mar 19, 2014 at 10:01 AM, Anne van Kesteren <annevk@annevk.nl> wrote: > On Tue, Nov 26, 2013 at 2:52 PM, Anne van Kesteren <annevk@annevk.nl> wrote: >> On Tue, Oct 1, 2013 at 12:42 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote: >>> All right, I think I've defined everything you need: >>> <http://dev.w3.org/csswg/selectors/#api-hooks> >> >> I don't have a use case for scoping method it seems. Unless I'm doing >> something wrong. > > Any updates on this? > > I think I am not understanding something. It seems if you make a > relative selector absolute, you no longer need scope-contained vs > filtered, as once it is absolute you can no longer match anything > outside that subtree. What am I missing? Scope-contained selectors can't match *any part* of their selector outside of the scope. Absolutizing the selector doesn't help here. Absolutizing also doesn't help scope-filtered elements, because they may or may not be absolute in the first place. .querySelector(), for example, takes absolute selectors, and treats them as scope-filtered. Even a relative selector doesn't necessarily help - if the selector contains a ":scope" in a functional pseudo-class, it won't get a :scope prepended to it, so it'll be allowed to match outside of the reference element. So no, neither type of scoping is removable. Note, though, that the new .find() or whatever is not scoped at all - it's just relative. (You need to be able to match .find("+foo"), etc.) ~TJ
Received on Wednesday, 19 March 2014 19:03:30 UTC