- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 19 Mar 2014 12:06:02 -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:23 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
> On Wed, Mar 19, 2014 at 5:01 PM, Anne van Kesteren <annevk@annevk.nl> wrote:
>> 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?
>
> In particular, it seems everything I need is scope-filtered. Do I need
> to say that explicitly?
Yes, you need to say it explicitly, though I doubt everything you need
is actually scope-filtered.
> I also noticed a problem, with the current descriptions I cannot
> handle matches(). E.g. document.body.matches("body") yields true, as
> would document.body.matches(":scope"), however, with either
> scope-filtered or scope-contained the body element would not be in the
> result of the match operation. Suggestions?
Don't scope them. You just need to supply the target element as the
sole element in the "reference element set". That lets :scope work
(assuming that's what you want), but it doesn't actually cause any
scoping to happen unless you say so.
~TJ
Received on Wednesday, 19 March 2014 19:06:49 UTC