In Live mode, can we call window.addEventListener?


#1

Hi,

I’m trying to build an mblock extension and in Live mode, I would like to call window.addEventListener to get some events of the browser.
I tried to add the call in the Extension Event Handler but I get an error (window undefined).

Do you know if this is possible ? How can I do it ?

Regards


#2

@QuentinM Currently extensions are sandboxed, meaning they can only run specific codes that mBlock allows (for security reasons). You could maybe ask mBlock support if they’d let you be an exception:
support@makeblock.com
But I’m not sure if they’d allow it.

Good luck!