deferred.reject()

deferred.reject()

deferred.reject( [args ] )Returns: Deferred

Description: Reject a Deferred object and call any failCallbacks with the given args.

Normally, only the creator of a Deferred should call this method; you can prevent other code from changing the Deferred's state by returning a restricted Promise object through deferred.promise().

When the Deferred is rejected, any failCallbacks added by deferred.then() or deferred-fail() are called- Callbacks are executed in the order they were added- Each callback is passed the args from the deferred-reject() call- Any failCallbacks added after the Deferred enters the rejected state are executed immediately when they are added, using the arguments that were passed to the deferred-reject() call- For more information, see the documentation for jQuery.Deferred().

© The jQuery Foundation and other contributors
Licensed under the MIT License.
https://api.jquery.com/deferred.reject

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部