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

[selectors-api] Matching of :scope in document.querySelector(All)

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 29 Nov 2012 21:01:32 -0500
Message-ID: <50B8137C.4090900@mit.edu>
To: public-webapps@w3.org
When implementing :scope support, I discovered that as things stand this 


is specified to return null.  In particular 
http://dev.w3.org/2006/webapi/selectors-api2/#queryselector step 1 calls 
which returns an empty set.  Then this empty set is passed as an 
explicit contextual reference set to selector matching in 
http://dev.w3.org/2006/webapi/selectors-api2/#evaluate-a-selector so 
that :scope doesn't match anything.

Is this intentional?  I would have expected the above call to return the 
documentElement, which is what :scope would match in a non-scoped 

Received on Friday, 30 November 2012 02:02:04 UTC

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