{"id":164,"date":"2023-08-25T17:22:23","date_gmt":"2023-08-25T17:22:23","guid":{"rendered":"\/\/api.jquery.com\/?p=164"},"modified":"2024-04-20T18:06:48","modified_gmt":"2024-04-20T18:06:48","slug":"deferred.reject","status":"publish","type":"post","link":"https:\/\/api.jquery.com\/deferred.reject\/","title":{"rendered":"deferred.reject()"},"content":{"rendered":"<article id=\"deferred-reject1\" class=\"entry method\"><h2 class=\"section-title\">\n<span class=\"name\">deferred.reject(  [args ] )<\/span><span class=\"returns\">Returns: <a href=\"http:\/\/api.jquery.com\/Types\/#Deferred\">Deferred<\/a><\/span>\n<\/h2>\n<div class=\"entry-wrapper\">\n<p class=\"desc\"><strong>Description: <\/strong> Reject a Deferred object and call any failCallbacks with the given <code>args<\/code>. <\/p>\n<ul class=\"signatures\"><li class=\"signature\">\n<h4 class=\"name\">\n<span class=\"version-details\">version added: <a href=\"\/category\/version\/1.5\/\">1.5<\/a><\/span><a id=\"deferred-reject-args\" href=\"#deferred-reject-args\"><span class=\"icon-link\"><\/span>deferred.reject(  [args ] )<\/a>\n<\/h4>\n<ul><li id=\"deferred-reject-args-args\">\n<div><strong>args<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#Anything\">Anything<\/a>\n<\/div>\n<div>\n        Optional arguments that are passed to the failCallbacks.\n      <\/div>\n<\/li><\/ul>\n<\/li><\/ul>\n<div class=\"longdesc\" id=\"entry-longdesc\">\n    <p>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 <a href=\"\/deferred.promise\/\"><code>deferred.promise()<\/code><\/a>.<\/p>\n    <p>When the Deferred is rejected, any failCallbacks added by <a href=\"\/deferred.then\/\"><code>deferred.then()<\/code><\/a> or <a href=\"\/deferred.fail\/\"><code>deferred.fail()<\/code><\/a> are called. Callbacks are executed in the order they were added. Each callback is passed the <code>args<\/code> from the <code>deferred.reject()<\/code> 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 <code>deferred.reject()<\/code> call. For more information, see the documentation for <a href=\"\/jQuery.Deferred\/\">jQuery.Deferred()<\/a>.<\/p>\n  <\/div>\n<\/div><\/article>","protected":false},"excerpt":{"rendered":"<p>Reject a Deferred object and call any failCallbacks with the given args.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,93],"tags":[],"class_list":["post-164","post","type-post","status-publish","format-standard","hentry","category-deferred-object","category-93"],"_links":{"self":[{"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts\/164","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/comments?post=164"}],"version-history":[{"count":2,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts\/164\/revisions"}],"predecessor-version":[{"id":785,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts\/164\/revisions\/785"}],"wp:attachment":[{"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/media?parent=164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/categories?post=164"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/tags?post=164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}