Search code examples
javascriptoopobjectgreasemonkeytampermonkey

Javascript callback implementation


This has been addressed, please see the answer located at -> Create a custom callback in JavaScript


Solution

  • You can use b() to invoke the function "b" if it is a function. You can also use the apply method to invoke a function. On the subject of callbacks, you may be interested in this article about the Promise API, since it provides an example of "get" and "getJSON" method that are consistent with this API.