W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: [Selectors API 2] Is matchesSelector stable enough to unprefix in implementations?

From: Aryeh Gregor <ayg@aryeh.name>
Date: Mon, 21 Nov 2011 20:31:31 -0500
Message-ID: <CAKA+AxnQGXHW8Q4PHY4uXvVDGv07OfMSLvY+3kfBNaUG48-A3g@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, public-webapps@w3.org
On Mon, Nov 21, 2011 at 11:34 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> The sticking point here is obviously item #2.  Data needed on use of
> "matches" and "is" as barewords in on* attributes, specifically.

I don't follow.  matchesSelector is on Element, not Node, right?  Why
is it relevant to on* attributes?  The lookup chain is first document
then window, with no elements anywhere, right?  Or am I
misunderstanding you?  I see why new proposed methods on Node like
.prepend could be an issue (although we could leave most of those off
Document too, as noted).

If this is a recurring problem, could we consider implementing magic
so that new methods on Document (or Node) that might cause problems
are ignored in on* unless you prefix with "document."?  So generally a
bare name will check for variables on the document first and then the
window, but for the magic blacklist ("matches", "is", whatever causes
problems) it will only check the window.  Obviously this is not a
great solution -- but I'd really hate us to lose out on the ideal
names for common methods just because of a tiny number of sites using

It's possible that I'm just completely not understanding what you mean
here, though.
Received on Tuesday, 22 November 2011 01:32:31 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:36 UTC