Regarding issue #26 and #27, I originally held back Common JS style exports and publishing on npm on purpose, as DOMPurify doesn't run on a pure Node.js environment (it does client side with Browserify).
I'm still looking for a way to get it to work on Node.js as well. jsdom lacks DOM Level 2 Traversal methods like createNodeIterator at the moment, which DOMPurify uses internally.
What's currently missing:
Regarding issue #26 and #27, I originally held back Common JS style exports and publishing on npm on purpose, as DOMPurify doesn't run on a pure Node.js environment (it does client side with Browserify).
I'm still looking for a way to get it to work on Node.js as well. jsdom lacks DOM Level 2 Traversal methods like
createNodeIteratorat the moment, which DOMPurify uses internally.What's currently missing:
document.implementation.createHTMLDocument(polyfilled with
return jsdom('<html><body></body></html>');)document.createNodeIterator(root, whatToShow, filter, entityReferenceExpansion)NodeIterator.nextNode()implementationdocument.body.outerHTML