You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jockey.on("event-name",function(payload,complete){setTimeout(function(){complete();},1000);// Note: You MUST return false in this case to tell Jockey you plan on calling// the complete function on your own once events have finished.returnfalse;});
The return false hassle can be avoided.
The Jockey code that calls this function literal can detect how many arguments it has (simply f.length).
You could have function(payload){} be treated as sync and function(payload, complete){} be treated as async.
Example from the README:
The
return false
hassle can be avoided.The Jockey code that calls this function literal can detect how many arguments it has (simply
f.length
).You could have
function(payload){}
be treated as sync andfunction(payload, complete){}
be treated as async.Mocha uses this. (See its documentation's Sync and Async sections)
The text was updated successfully, but these errors were encountered: