- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 24 Nov 2011 06:42:33 -0800
- To: Lachlan Hunt <lachlan.hunt@lachy.id.au>
- Cc: Sean Hogan <shogun70@westnet.com.au>, Boris Zbarsky <bzbarsky@mit.edu>, public-webapps@w3.org
On Thu, Nov 24, 2011 at 12:46 AM, Lachlan Hunt <lachlan.hunt@lachy.id.au> wrote: > On 2011-11-23 23:38, Sean Hogan wrote: >> >> Are there any issues with: >> >> - If you want to use selectors with explicit :scope then you use >> querySelector / querySelectorAll / matchesSelector. >> >> - If you want to use selectors with :scope implied at the start of each >> selector in the selector list (as most js libs currently do) then you >> use find / findAll / matches. > > The matches method will not change behaviour depending on whether or not > there is an explicit :scope because it is always evaluated in the context of > the entire tree. There is never an implied :scope inserted into the > selector, so there will not be two alternative matches methods. Agreed. You will almost always want to evaluate matches against the whole tree, and when you don't you can use an explicit scope. ~TJ
Received on Thursday, 24 November 2011 14:43:29 UTC