diffDOM

This library allows the abstraction of differences between DOM elements as a "diff" object, representing the sequence of modifications that must be applied to one element in order to turn it into the other element. This diff is non-destructive, meaning that relocations of DOM nodes are preferred over remove-insert operations.

This project is licensed under the LGPL v. 3. For details see the license.

Tests

Automatic tests are run using jest. There are also some browser based tests you can look at:

There is a test of random elements.

There is also a version of the random tests that reloads if no errors have been found, mainly useful for finding errors.

The site integration test, contributed by user unbug, allows for testing for speed on a 170kb site real-world-like site where it is integrated with jQuery.

Demo

Check out the interactive demo!

Usage/Download

Usage instructions and download available on github.