Class: SC.Async
Extends
SC.Object.
Represents a call that is intended to be asynchronous. This is used during a state transition process when either entering or exiting a state.
Defined in: async.js
Field Summary
- Fields borrowed from SC.Object:
- concatenatedProperties, isDestroyed, isObject, nextProperty, object, property, target, toInvalidate
- Fields borrowed from SC.Observable:
- isObservable
Class Methods
Class Method Detail
perform(func, arg1, arg2)
Call in either a state's enterState
or exitState
method when you
want a state to perform an asynchronous action, such as an animation.
Examples:
SC.State.extend(
{
enterState: function() {
return SC.Async.perform('foo');
},
exitState: function() {
return SC.Async.perform('bar', 100);
}
foo: function() { ... },
bar: function(arg) { ... }
});
- Parameters:
- func
- {String|Function} the function to be invoked on a state
- arg1
- Optional. An argument to pass to the given function
- arg2
- Optional. An argument to pass to the given function
- Returns:
- SC.Async
- a new instance of a SC.Async
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 08 2015 10:02:20 GMT-0600 (CST)