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.

createRange function missing with jsdom 15.2.0 #56

Description

@mapi33

In nodejs, I use jsdom 15.2.0 to parse the html source code.
It works well for most XPaths except when the path is to an attribute, such as //div/@Class.

TypeError: Cannot read property 'createRange' of undefined at La (/var/www/api/node_modules/wicked-good-xpath/dist/wgxpath.install-node.js:42:35) at Pa (/var/www/api/node_modules/wicked-good-xpath/dist/wgxpath.install-node.js:42:645) at kb.a (/var/www/api/node_modules/wicked-good-xpath/dist/wgxpath.install-node.js:57:328) at Nb.evaluate (/var/www/api/node_modules/wicked-good-xpath/dist/wgxpath.install-node.js:73:1130) at Document.Pb.d.evaluate (/var/www/api/node_modules/wicked-good-xpath/dist/wgxpath.install-node.js:77:159)

Is there any other library that is fully compatible with wgxpath? or any other workaround?

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