Releases: growthbook/dom-mutator
Releases · growthbook/dom-mutator
v0.7.0
What's Changed
- Dom mutations to support inline edit by @gazzdingo in #16
Full Changelog: v0.6.0...v0.7.0
v0.6.0
v0.5.0
v0.4.0
Version 0.3.2
Changes
- Attach global listener to
document.documentElement
instead ofdocument.body
. Now dom-mutator can be loaded in the head before the body is ready.
Version 0.3.1
Changes
- New
mutate.declarative
method for serializable mutations that don't use callback functions
Vertion 0.3.0
Breaking Changes
- New public api:
mutate.html("h1", html => html.toUpperCase());
mutate.classList("div.greeting", classes => classes.add("new-class"));
mutate.attr(".get-started", "title", oldVal => "This is my new title attribute");
- Return value is now a MutationController object:
const controller = mutate.html("h1", html => html.toUpperCase());
...
controller.revert();
Version 0.2.4
Bug fixes:
- html mutations were not firing when a child's attribute or textNode changed
- infinite loop race condition when 2 mutations affected the same element
- immediately re-applying a mutation after reverting did not work
Version 0.2.1
Changes:
- Fail gracefully on NodeJS instead of throwing errors. Useful for frameworks like NextJS