Releases: bwrrp/slimdom.js
Releases · bwrrp/slimdom.js
2.2.1
2.2.0
This release improves compliance with the DOM living standard:
- Before, if mutation observer callbacks needed to run asynchronously, they were scheduled using either setImmediate or setTimeout (depending on availability). This could allow other tasks to run before the callback, which could be unexpected. This release changes the scheduling to use an actual microtask, courtesy of Promise#then.
- The newly introduced Element#toggleAttribute method has been implemented.
...as well as some other improvements:
- Typings for several methods are now generic to avoid the need to cast the return value to the appropriate Node subclass.
- A number of "unsafe" mutation / creation functions have been added that are necessary for parsing HTML documents. These bypass some checks performed by the standard DOM APIs. An example has been added showing how to integrate slimdom with the parse5 HTML5 parser.
- Updated devDependencies to their latest versions.
2.1.3
2.1.2
2.1.1
2.1.0
This release adds XML serialization support:
- Use
new slimdom.XMLSerializer()
to get an object implementing the XMLSerializer interface, as defined in the DOM Parsing and Serialization W3C Editor's Draft. slimdom.serializeToWellFormedString
provides a convenient way to serialize while enforcing XML well-formedness.- The
innerHTML
andouterHTML
properties have been added on elements (currently read-only).
2.0.1
2.0.0
This release pretty much rewrites the entire codebase to align its behavior with the DOM living standard, as last updated 15 June 2017. Please refer to the README.md for details on what's included and what isn't.
For those upgrading from 1.0:
slimdom.createDocument()
has been removed in favor ofnew slimdom.Document()
- The library now includes an ES module, which does not have a default export. Use
import * as slimdom from 'slimdom'
instead ofimport slimdom from 'slimdom'
- All methods are a lot less forgiving, and now throw errors as defined by the spec
- documentNode.ownerDocument is now null, as required by the spec