Skip to content

Instantly share code, notes, and snippets.

@michaelkarrer81
Created August 27, 2021 12:32
Show Gist options
  • Save michaelkarrer81/ea308ed42c53588bd0976e5785c4ed6b to your computer and use it in GitHub Desktop.
Save michaelkarrer81/ea308ed42c53588bd0976e5785c4ed6b to your computer and use it in GitHub Desktop.
[javascript debugging] javascript debugging and error searchin tipps #javascript #debugging
var foo = document.getElementsByName('form-group-country_id')[0];
console.log('FOO ELEMENT: ', foo)
var observer = new MutationObserver(function(mutations) {
console.log('STYLE CHANGED');
debugger
});
observer.observe(foo, {
attributes: true,
attributeFilter: ['style'] });
foo.dataset.selectContentVal = 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment