Skip to content
This repository has been archived by the owner on Aug 24, 2018. It is now read-only.

Bug: jsdom.jsdom is not a function #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ module.exports = (function createParser () {
reduceTransformations[attrname] = externalReduceTransformations[attrname]
}

var document = jsdom.jsdom(html.toString())
var xhtml = xmlser.serializeToString(document)
var document = new jsdom.JSDOM(html.toString())
var xhtml = xmlser.serializeToString(document.window.document)
xhtml = xhtml.replace(' xmlns="http://www.w3.org/1999/xhtml"', '') // Ugly hack, for now
var doc = new dom().parseFromString(xhtml)
return parseNode(config, doc)
Expand Down
Loading