- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Thu, 29 Nov 2012 21:01:32 -0500
- To: public-webapps@w3.org
When implementing :scope support, I discovered that as things stand this call: document.querySelector(":scope") is specified to return null. In particular http://dev.w3.org/2006/webapi/selectors-api2/#queryselector step 1 calls http://dev.w3.org/2006/webapi/selectors-api2/#determine-contextual-reference-nodes 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 stylesheet... -Boris
Received on Friday, 30 November 2012 02:02:04 UTC