This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5860 - [selectors-api2] Define new scoped method
Summary: [selectors-api2] Define new scoped method
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Selectors API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 enhancement
Target Milestone: ---
Assignee: Lachlan Hunt
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-13 11:17 UTC by Lachlan Hunt
Modified: 2009-09-26 21:50 UTC (History)
2 users (show)

See Also:


Attachments

Description Lachlan Hunt 2008-07-13 11:17:56 UTC
To address the use cases which aren't entirely covered by the proposed :context pseudo-class and improve performance for JS libraries, we may need to define a new scoped method.

IRC discussion in #whatwg:
<Lachy> othermaciej, I'm not yet convinced we need queryScopedSelector as well as this.
<othermaciej> Lachy: I think there are two reasons we may still want it:
<othermaciej> 1) otherwise JS libraries have to do rewriting of their incoming selectors, which is both slower and more error-prone in JS code than in native code
<othermaciej> 2) without a way to access those syntax features directly, it becomes harder for authors to ever switch off the library wrappers to the native version, even once all browsers support it

http://krijnhoetmer.nl/irc-logs/whatwg/20080711#l-23

There are also some use cases that aren't addressed by the current :context proposal, however, this is not intended to be a replacement for :context.  It is expected that the solution will be usable in conjunction with :context, but differently from the existing methods.

See the appendix at the end of this email
http://lists.w3.org/Archives/Public/public-webapi/2008May/0057.html

And a proposed solution to the parsing problem
http://lists.w3.org/Archives/Public/public-webapi/2008May/0058.html
Comment 1 Lachlan Hunt 2008-07-17 11:39:24 UTC
Possible parsing solution

http://lists.w3.org/Archives/Public/public-webapps/2008JulSep/0181.html
Comment 2 Lachlan Hunt 2009-09-26 21:50:17 UTC
The scoped selector string proposal should adequately address the use cases for this.