// Let's get hold of those elements var outer = document.querySelector('.outer'); var inner = document.querySelector('.inner');
// Let's listen for attribute changes on the // outer element newMutationObserver(function() { console.log('mutate'); }).observe(outer, { attributes: true });
// Here's a click listener… functiononClick() { console.log('click');