- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 20 Oct 2011 04:40:11 -0700
- To: Alex Russell <slightlyoff@google.com>
- Cc: Lachlan Hunt <lachlan.hunt@lachy.id.au>, Webapps WG <public-webapps@w3.org>, Yehuda Katz <wycats@gmail.com>, John Resig <jeresig@gmail.com>, Paul Irish <paulirish@google.com>
On Thu, Oct 20, 2011 at 3:39 AM, Alex Russell <slightlyoff@google.com> wrote: > There's a corner case I haven't formed an opinion on though: > > el.find("div span :scope .whatevs"); > > ...does what? I think it's an error. ":scope" will need to occur in > the first term or not at all for .find(). Disagree. If :scope appears in the selector, just match across the whole document. It's simple and useful. (It's equivalent to document.querySelector("div span :scope .whatevs", el), except shorter and amenable to chaining.) ~TJ
Received on Thursday, 20 October 2011 11:41:09 UTC