- From: Marat Tanalin | tanalin.com <mtanalin@yandex.ru>
- Date: Wed, 20 Jun 2012 19:46:54 +0400
- To: Lachlan Hunt <lachlan.hunt@lachy.id.au>
- Cc: Simon Pieters <simonp@opera.com>,public-webapps.w3.org <public-webapps@w3.org>
20.06.2012, 18:14, "Lachlan Hunt" <lachlan.hunt@lachy.id.au>: > 4. Support for returning elements that are not descendants of the > context object. > > This feature allows a selector to be constructed such that it matches an > element anywhere in the tree relative to the context element. This > feature is not relevant to document.find(), since it can already return > anything from the whole tree. > > elm.find("+span") // span is a sibling > elm.find("/for/ input") // input could be anywhere > elm.find(":not(:scope)") // Everything except the context object > > This feature cannot be supported on Element.qSA, even when using eplicit > :scope, because matching elements need to be descendants of the context > object. It's unclear why an _updated_ qSA version should have same limitation that "matching elements need to be descendants of the context object". There is nothing obvious that makes h1.querySelector('+ H2') impossible to work in newer implementations (in older ones it would not work anyway -- to the same extent as `elm.querySelector(">span")` that you've declared as "could work").
Received on Wednesday, 20 June 2012 15:47:28 UTC