Open Sourcing DOM Comparator
DOM Comparator is a JavaScript library that analyzes and compares two HTML strings, and returns back a diff object. It returns an output which is an array of operation objects. DOM Comparator on Github Here's a simple example: var stringA = '<ul><li class="active">list item 1</li><li>list item 2</li></ul>'; var stringB = '<ul><li>list item 1</li><li>list item 2</li></ul>'; // Compare the two…
This is an excerpt. The full article continues at Wingify.