YUI Class
Item Index
Methods
Methods
soon
(
Object
-
callback
Y.soon accepts a callback function. The callback function will be called once, as soon as possible, in a future turn of the JavaScript event loop. If the function requires a specific execution context or arguments, wrap it with Y.bind. Y.soon returns an object with a cancel method. If the cancel method is called before the callback function, the callback function won't be called.
based on setImmediate.js. https://github.com/NobleJS/setImmediate
Copyright (c) 2011 Barnesandnoble.com, llc and Donavon West
https://github.com/NobleJS/setImmediate/blob/master/MIT-LICENSE.txt
Parameters:
-
callback
Functionfunction
Returns:
Object:
- cancel
- If the cancel method is called before the callback function, the callback function won't be called.