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

Re: QSA, the problem with ":scope", and naming

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Tue, 15 Nov 2011 15:17:36 +0100
Message-ID: <4EC27480.60805@lachy.id.au>
To: Brian Kardell <bkardell@gmail.com>
CC: Jonas Sicking <jonas@sicking.cc>, John Resig <jeresig@gmail.com>, Alex Russell <slightlyoff@google.com>, Paul Irish <paulirish@google.com>, Webapps WG <public-webapps@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, Yehuda Katz <wycats@gmail.com>
On 2011-11-15 15:13, Brian Kardell wrote:
>> Right now, the spec does however handle that use case by doing this:
>>   document.querySelectorAll(":scope .foo", x);
>> Where x is either an individual element, or an Array, NodeList or
>> numerically indexed object containing 0 or more Elements.
>> (It does however limit the result only to elements that are in the
>> document, and any disconnected elements in the collection x would not be
>> found.)
> What spec are you referring to? I've never seen that and I am having
> trouble finding it now.

It's in the draft of Selectors API Level 2.


See the refElement/refNodes parameters which specify elements matched by 

Lachlan Hunt - Opera Software
Received on Tuesday, 15 November 2011 14:18:08 UTC

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