Skip to content Skip to sidebar Skip to footer

Listening To An Event From My Greasemonkey Script

I'm trying to figure out how to listen to an event emitter from my greasemonkey script, but I keep getting access violation errors (Permission denied to access object). Page The pa

Solution 1:

I managed to get it working. The solution was to export the callback function into unsafe context via exportFunction(myFunction, unsafeWindow)

The script part should look like this:

unsafeWindow.test.on('test', exportFunction(function(data){
   console.log(data);
}, unsafeWindow));

Big thanks to wOxxOm for pointing this out.

Post a Comment for "Listening To An Event From My Greasemonkey Script"