Skip to content

Releases: bwrrp/slimdom.js

4.0.1

23 Jun 09:04
Compare
Choose a tag to compare
  • Fix XML test suite download script not working under type="modules"

Full Changelog: 4.0.0...4.0.1

4.0.0

23 Jun 08:09
Compare
Choose a tag to compare
  • Fix ESM usage in node. This is only a breaking change because it renames the UMD module file provided for older CJS environments.

Full Changelog: 3.2.0...4.0.0

3.2.0

23 Jun 07:14
Compare
Choose a tag to compare
  • Use the new XML parser to parse your documents - no need for external libraries! The new parser is written from scratch, and is fully in-line with the XML 1.0 fifth edition specification. While it does not validate against a DTD, it does process one (if present) for entities and default attribute values, and enforces all well-formedness checks.
  • Optimize Range.detach by removing the loop by @DrRataplan in #141

Full Changelog: 3.1.0...3.2.0

3.1.0

06 Mar 13:52
Compare
Choose a tag to compare

What's Changed

  • Implement missing Range methods: deleteContents, extractContents, cloneContents, insertNode, surroundContents and toString.
  • Implement Node.compareDocumentPosition and associated constants.

Full Changelog: 3.0.2...3.1.0

3.0.2

31 Jan 10:25
Compare
Choose a tag to compare

What's Changed

  • Work around a bug in Safari causing an error because it returns null instead of undefined from WeakRef#deref

Full Changelog: 3.0.1...3.0.2

3.0.1

10 Jan 11:25
Compare
Choose a tag to compare

What's Changed

  • Point to the TypeScript definition files and add an export map in package.json

New Contributors

  • @wvbe made their first contribution in #136

Full Changelog: 3.0.0...3.0.1

3.0.0

21 Dec 15:40
Compare
Choose a tag to compare

This release contains minor bugfixes and several new features.

  • Breaking: rename bundles - this package now contains slimdom.umd.js for UMD / CommonJS environments, and slimdom.esm.js for environments that support ECMAScript modules. Most bundlers and environments should automatically select an appropriate version but some may need configuration changes to account for the new filenames.
  • Implement getElementsByTagName / getElementsByTagNameNS.
  • Implement replaceChildren.
  • Implement StaticRange.
  • Implement DOMException.
  • Use XML 1.0 fifth edition rules instead of the more restrictive fourth edition rules to validate names.
  • Use WeakRef if available to allow GC to collect Range instances.
  • Improve serialization error messages.
  • Fix some edge cases in the treatment of undefined, null and empty strings when passed to methods expecting a string.
  • Updated to latest version of the DOM spec.
  • Updated code and examples to the latest versions of all devDependencies.

New Contributors

Full Changelog: 2.3.2...3.0.0

2.3.2

10 Jan 09:36
Compare
Choose a tag to compare

This is a bugfix release:

  • Whitespace characters in attribute values are now escaped such that they round-trip cleanly. This deviation from the spec matches the behavior of Chrome, Firefox and Edge, and ensures that tabs, carriage returns and line feeds are not lost due to attribute value normalization applied during parsing.
  • The TypeScript typings now properly define the node type constants as instance properties on Node instances as well as static properties on the Node constructor.
  • Scheduling mutation observer callbacks will now try to use the queueMicrotask API when available instead of using promises to approximate that behavior.
  • The bundled sourcemaps now map back to the original TypeScript code.

2.3.1

31 May 10:19
Compare
Choose a tag to compare

This release contains a bugfix, and reduces the size of the slimdom bundles by making a change to the build process:

  • The Attr value property can no longer be set to non-string values. Attempting to set a non-string value will now convert that value to a string.
  • The slimdom bundles now target only somewhat-modern browsers (ES2017). This reduces the amount of code generated only to support older environments. If you still need to run slimdom on very old browsers / environments, it's probably best to use something like babel (with its preset-env) to convert the library.

2.3.0

29 Mar 14:53
Compare
Choose a tag to compare

This release contains a bugfix and a few new features:

  • Serializing nodes to well-formed XML no longer throws when it encounters a prefixed element that explicitly resets the default namespace (using xmlns=""). This works around a bug in the DOM Parsing specification.
  • The textContent property has been implemented for all nodes.
  • The prepend, append, before, after, replaceWith and remove methods have been implemented for nodes that support them.
  • The wholeText property for text nodes has been implemented.
  • The slimdom package now includes TypeScript typings.
  • Updated devDependencies to their latest versions.