Easy Tutorial
❮ Misc Deferred Then Misc Callbacks Disable ❯

jQuery deferred.rejectWith() Method

jQuery Miscellaneous Methods


Definition and Usage

The deferred.rejectWith() function is used to reject a deferred object and invoke any failCallbacks with the given context and args.

Note: 1. Typically, only the creator of the deferred object should call this method. You can prevent other code from changing the state of the deferred object or reporting its state by returning a restricted Promise object with deferred.promise().


Syntax

Parameter Description
context Object type, passed as the this object to the fail callbacks
args Array type, passes an optional array of arguments to the fail callbacks

jQuery Miscellaneous Methods

❮ Misc Deferred Then Misc Callbacks Disable ❯