global
object).
callback
function supplied to each action script effectively acts as a signal to indicate completion of operation. An action script should complete immediately following a call to the callback
function (either implicitly or by explicitly executing a JavaScript return statement) and should refrain from any other operation.
callback
function must be called exactly once; calling the function more than once within an action script will lead to unpredictable results and/or errors.callback
is executed with no parameters, as in callback()
, the implication is that function has been called as though callback(null)
had been executed.callback
function must be deferred to the point where asynchronous processing completes, and must be the final thing called. Asynchronous execution will result in a JavaScript callback
being executed after the asynchronous operation is complete; this callback is typically fired at some point after the main (synchronous) body of a JavaScript function completes.
callback
function will result in a stall of execution, and ultimately in an error condition being returned. The action script must call the callback
function exactly once: the callback
function must be called at least once in order to prevent stall of execution, however it must not be called more than once otherwise unpredictable results and/or errors will occur.