listen to all events on an html element
var img = document.querySelector("#img_div img"),
observer = new MutationObserver((changes) => {
changes.forEach(change => {
if(change.attributeName.includes('src')){
console.dir(img.src);
}
});
});
observer.observe(img, {attributes : true});