wgxpath.NodeSet.merge depends upon the result of the xpath inheriting from Node, and in particular being able to compare the node order, e.g. when doing //img/@src
TypeError: Cannot read property 'createRange' of undefined
at Object.b.dom.compareNodeOrder (wgxpath.install-node.js:255:276)
at Function.f.NodeSet.merge (wgxpath.install-node.js:281:723)
at [object Object].f.PathExpr.evaluate (wgxpath.install-node.js:317:13)
at [object Object].evaluate (wgxpath.install-node.js:344:370)
at Document.e.evaluate (wgxpath.install-node.js:350:286)
What do you think the best solution for this is? Perhaps wrapping the Attr instance in a Node wrapper? Unfortunately the spec[1] doesn't even have a link back to the owning element (which actually seems to contradict some of the text within the section).
[1] https://www.w3.org/TR/dom/#interface-attr