aredridel/html5 — pull request #93 by arlolra (2013-09-16 21:41:30+00:00)
Title: Make jsdom an optional dependency.

Other doms (notably domino) are supported now and jsdom has a native dependency that some environments fail to build. As long as a document is set on the parser, jsdom isn't required so something like this works,

new HTML5.Parser({
document: domino.createDocument( '' )
});

https://github.com/wikimedia/mediawiki-extensions-Parsoid/blob/master/js/lib/mediawiki.HTML5TreeBuilder.node.js#L31-L33

See #69 as well.