MutationObserver - sgml/signature GitHub Wiki

function bar(){console.log(Array.from(arguments))};
var foo = new MutationObserver(bar);
var baz = foo.observe(document.querySelector(".progress-segment.active"), { childList: true } );

References