0

I need to listen for when a function is called in a extension JS file. I know how to access objects inside web page JS files from extension JS files, thanks to user wOxxOm, but I'm still stumped on how to listen for function calls.

Cyphical
  • 1
  • 2
  • What have you tried so far? Can you post some code or examples to help us understand your goal? – Ernesto Stifano Jan 10 '21 at 16:45
  • I wonder if you could use a proxy? – evolutionxbox Jan 10 '21 at 16:47
  • You simply redefine the function with your hook like [I've already shown](https://stackoverflow.com/a/64817357) in your previous [question](https://stackoverflow.com/questions/65651134/listening-for-when-a-function-is-called-in-another-js-file-firefox-addon-ext). Here's another [simpler example](https://stackoverflow.com/a/62168202). You can probably find more by googling "wrappedJSObject exportFunction". – wOxxOm Jan 10 '21 at 16:53
  • @wOxxOm Oh. I should probably stop working on no sleep. Thanks again. – Cyphical Jan 10 '21 at 17:00
  • Does this answer your question? [Listening for when a function is called in another JS file. (Firefox Addon / Extension)](https://stackoverflow.com/questions/65651134/listening-for-when-a-function-is-called-in-another-js-file-firefox-addon-ext) – evolutionxbox Jan 10 '21 at 17:36

0 Answers0