W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2014

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

From: Anne van Kesteren <annevk@annevk.nl>
Date: Tue, 2 Sep 2014 18:07:02 +0200
Message-ID: <CADnb78hv2AJzDvhuuLzrR9bgyB5UYPOvDhWx9WqLZrWemrdNdw@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "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 Tue, Sep 2, 2014 at 6:00 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> I'd like to be clear on what the proposal is for closest().  Is it:
> 1)  Pass the element that closest() was called on as the :scope elements
> argument to all the calls up the parent chain.
> or
> 2)  Pass the element that you're matchign against as the :scope elements
> argument.
> ?  #2 is what you get if you desugar closest() in terms of matches(), but #1
> seems to be closer to the use case Tab is thinking of, right?

1) makes the most sense to me and what I was planning on going with.
But yes, polyfilling would become harder.

Received on Tuesday, 2 September 2014 16:07:30 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:23 UTC