Deferred

Deferred

package js-jquery

Available on js

Constructor

new (?beforeStart:Deferred ‑> Void)

A factory function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.

Methods

always (alwaysCallbacks:EitherType<Function, Array<Function>>, ?alwaysCallbacks:EitherType<Function, Array<Function>>):Deferred

Add handlers to be called when the Deferred object is either resolved or rejected-

done (doneCallbacks:EitherType<Function, Array<Function>>, ?doneCallbacks:EitherType<Function, Array<Function>>):Deferred

Add handlers to be called when the Deferred object is resolved-

fail (failCallbacks:EitherType<Function, Array<Function>>, ?failCallbacks:EitherType<Function, Array<Function>>):Deferred

Add handlers to be called when the Deferred object is rejected-

isRejected ():Bool

Determine whether a Deferred object has been rejected.

isResolved ():Bool

Determine whether a Deferred object has been resolved.

notify (args:Dynamic):Deferred

Call the progressCallbacks on a Deferred object with the given args-

notifyWith (context:Dynamic, ?args:Array<Dynamic>):Deferred

Call the progressCallbacks on a Deferred object with the given context and args-

pipe (?doneFilter:Function, ?failFilter:Function):Promise

pipe (?doneFilter:Function, ?failFilter:Function, ?progressFilter:Function):Promise

Utility method to filter and/or chain Deferreds.

progress (progressCallbacks:EitherType<Function, EitherType<Array<Dynamic>, Array<Function>>>, ?progressCallbacks:EitherType<Function, EitherType<Array<Dynamic>, Array<Function>>>):Deferred

Add handlers to be called when the Deferred object generates progress notifications-

promise (?target:Dynamic):Promise

Return a Deferred's Promise object.

reject (?args:Dynamic):Deferred

Reject a Deferred object and call any failCallbacks with the given args-

rejectWith (context:Dynamic, ?args:Array<Dynamic>):Deferred

Reject a Deferred object and call any failCallbacks with the given context and args-

resolve (?args:Dynamic):Deferred

Resolve a Deferred object and call any doneCallbacks with the given args-

resolveWith (context:Dynamic, ?args:Array<Dynamic>):Deferred

Resolve a Deferred object and call any doneCallbacks with the given context and args-

state ():String

Determine the current state of a Deferred object.

then (doneCallbacks:EitherType<Function, Array<Function>>, failCallbacks:EitherType<Function, Array<Function>>):Promise

then (doneFilter:Function, ?failFilter:Function, ?progressFilter:Function):Promise

then (doneCallbacks:EitherType<Function, Array<Function>>, failCallbacks:EitherType<Function, Array<Function>>, ?progressCallbacks:EitherType<Function, Array<Function>>):Promise

Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/jquery/Deferred.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部