- Remove: support for old, untested HTML and XML parsers, namely davglass/node-htmlparser and isaacs/sax-js. In the future we plan to work toward a standardized parsing interface that other parsers can implement, instead of adding custom code to jsdom for various parsers. This interface still is being decided though, as it needs to support complex things like pausing the parse stream (for
document.write) and parsing disconnected fragments (fordocument.innerHTML). (@Sebmaster) - Add: new
parsingModeconfiguration, to allow you to manually specify XML or HTML. (@Sebmaster) - Change: jsdom will no longer use the presence of
<?xmlor similar to attempt to auto-detect XHTML documents. Instead, it will by default treat them the same as browsers do, with the<?xmldeclaration just being a bogus comment. If you need your document interpreted as XHTML instead of HTML, use theparsingModeoption. (@Sebmaster) - Tweak: memoize various DOM-querying functions (e.g.
getElementsByTagName,querySelector, etc.) to improve performance. (@ccarpita)