Assuming what you want to do is invoke a JavaScript function next time around the idle loop AND there is no "this" JavaScript context needed, then I think the solution would be to call:
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Assuming what you want to do is invoke a JavaScript function next time around the idle loop AND there is no "this" JavaScript context needed, then I think the solution would be to call:
jsiQueueEvents(NULL, jsCallbackFunction, params, count)
Where jsCallbackFunction is a reference to a JsVar that is a function reference.