20.06.2012, 18:14, "Lachlan Hunt" <[email protected]>:
> 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").