Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Attr no longer innherits from Node in DOM4: breaks wgxpath.NodeSet.merge #40

Description

@mjgp2

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions