W3C home > Mailing lists > Public > www-style@w3.org > September 2014

Re: Behavior of matches() and closest() with :scope()

From: Anne van Kesteren <annevk@annevk.nl>
Date: Tue, 23 Sep 2014 09:32:15 +0200
Message-ID: <CADnb78gCWbyOTTzBL68qyogBprjSfgM-zvNJ8pEw3rG0UKYAhw@mail.gmail.com>
To: Sean Hogan <shogun70@westnet.com.au>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, "Tab Atkins Jr." <jackalmage@gmail.com>, "www-style@w3.org" <www-style@w3.org>, "www-dom@w3.org" <www-dom@w3.org>, David Håsäther <hasather@gmail.com>
On Mon, Sep 22, 2014 at 11:54 AM, Sean Hogan <shogun70@westnet.com.au> wrote:
> No. I am also saying that if there is no explicit scope reference node
> passed in then the implied scope reference node is document (or some
> equivalent for elements not in document). I believe that currently the
> implied scope reference node is the element itself.
> Currently:
>     E.matches(':scope') -> true
>     E.matches(':scope ul li') -> false
> Should be:
>     E.matches(':scope') -> false
>     E.matches(':scope ul li') -> true if E.matches('ul li') is true

Why would that be better? As far as the :scope pseudo-element is
concerned, the current semantics seem much more intuitive. I could see
how you maybe want to rebind :scope, or restrict the tree traversed,
but not why you want to change the way :scope works.

Received on Tuesday, 23 September 2014 07:32:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:46 UTC