DOMContentLoaded event firing twice for a single page load
I don't know if I would consider this "normal" however the possibilities for outside applications to affect the operation of your plugin are endless.
That said, I think regardless of AVG causing this anomoly, the smart thing to do, like you said, is to check if the column exists prior to insertion, as AVG may not be the only outside application that influences firefox event triggers.
I am very weary of the DOM driven events because in my own plugin, and the testing of it throughout development has shown PLENTY of anomolies based on so many variables (different OS, different version of FF, different applications on host computer, different plugins within any given users FF, etc..)
To summarize:
- Bug in AVG? Maybe.
- Is the potential there for your plugin performance to be affected by MANY other sources? Absolutely!
- Solution: IMHO- Always check to see if your change has been made prior to making the actual change for all DOM items just to be safe.
document.addEventListener('DOMContentLoaded', () => {
console.log('DOMContentLoaded');
// do stuff
},{ once: true });