Recent versions of Firefox allow you to block some stuff like that: https://support.mozilla.org/en-US/kb/identify-problems-third...
Though it's possible they use different code injection tricks to make blocking impossible. (You can't block Defender from listening to events for example)