I'm developing my first Webextension (Firefox add-on) and it's working properly.
However, I'm having problems when part of the site is navigated without refresh. That is, the extension does not work because it only works when you refresh or finish the page request.
My code is pretty much this:
node = document.getElementsByClassName("exemplo")[0];
if (node.parentNode) {
node.parentNode.removeChild(node);
}
I do not know if there is any way or function to make the site call this code whenever it changes its status even though it does not make a new request.