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

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 20 Oct 2011 10:23:30 -0400
Message-ID: <4EA02EE2.7080302@mit.edu>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: Ojan Vafai <ojan@chromium.org>, Jonas Sicking <jonas@sicking.cc>, Alex Russell <slightlyoff@google.com>, Webapps WG <public-webapps@w3.org>, Yehuda Katz <wycats@gmail.com>, John Resig <jeresig@gmail.com>, Paul Irish <paulirish@google.com>, Lachlan Hunt <lachlan.hunt@lachy.id.au>
On 10/20/11 1:08 AM, Tab Atkins Jr. wrote:
> I disagree.  It's extremely useful and natural for .find(":scope +
> div") to match sibling of the context node.

I really don't think it is.  If you want that, use document.find(":scope 
+ div", context).

> Basically, the presence of :scope would turn off *all* the limitations

That's a _really_ bizarre behavior.  So in this case:

   foo.find(":scope + div, div")

what all divs in the document would be found?  Or is the "oh, ignore the 
reference node except for matching :scope" meant to only apply on a 
per-selector basis inside the selector list?  That has its own issues, 
especially with performance (e.g. merging nodesets while preserving DOM 
order).

-Boris
Received on Thursday, 20 October 2011 14:24:10 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:48 GMT