Closed bm2u closed 8 years ago
Got it.
$list.watch({
properties: 'prop_innerHTML',
watchChildren: true,
callback: function (data, i, mutations) {
mutations.forEach(function(record) {
if (record.type === 'childList' && record.removedNodes.length > 0) {
console.info('removed item');
} else if (record.addedNodes.length > 0) {
console.info('added item');
}
});
}
});
Great - thanks for posting!
Hey Rick, excellent work. Would you be so kind as to provide an example for observing childList (added, removed)? Thx in advance, bm2u