Working in Greasemonkey script. HTML page contains JS script with some function. I want know event (when) this function executed (done/return).
This code looks like work (Proxy for setPointer function):
setPointer = new Proxy(setPointer, {
apply: function(method, context, args) {
alert("setPointer was invoked");
method();
}
});
But it's NOT works from Greasemonkey script. Only if I put it directly into HTML after setPointer function.