{"id":156,"date":"2026-08-10T19:11:09","date_gmt":"2026-08-10T19:11:09","guid":{"rendered":"https:\/\/api.jquery.com\/?p=156"},"modified":"2026-08-10T19:11:09","modified_gmt":"2026-08-10T19:11:09","slug":"deferred.notifyWith","status":"publish","type":"post","link":"https:\/\/api.jquery.com\/deferred.notifyWith\/","title":{"rendered":"deferred.notifyWith()"},"content":{"rendered":"<article id=\"deferred-notifyWith1\" class=\"entry method\"><h2 class=\"section-title\">\n<span class=\"name\">deferred.notifyWith( context [, 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> Call the progressCallbacks on a Deferred object with the given context and <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.7\/\">1.7<\/a><\/span><a id=\"deferred-notifyWith-context-args\" href=\"#deferred-notifyWith-context-args\"><span class=\"icon-link\"><\/span>deferred.notifyWith( context [, args ] )<\/a>\n<\/h4>\n<ul>\n<li id=\"deferred-notifyWith-context-args-context\">\n<div><strong>context<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#Object\">Object<\/a>\n<\/div>\n<div>\n        Context passed to the progressCallbacks as the <code>this<\/code> object.\n      <\/div>\n<\/li>\n<li id=\"deferred-notifyWith-context-args-args\">\n<div><strong>args<\/strong><\/div>\n<div>Type: <a href=\"http:\/\/api.jquery.com\/Types\/#Array\">Array<\/a>\n<\/div>\n<div>\n        An optional array of arguments that are passed to the progressCallbacks.\n      <\/div>\n<\/li>\n<\/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 or reporting status by returning a restricted Promise object through deferred.promise().<\/p>\n    <p>When <code>deferred.notifyWith<\/code> is called, any progressCallbacks added by <a href=\"\/deferred.then\/\"><code>deferred.then<\/code><\/a> or <a href=\"\/deferred.progress\/\"><code>deferred.progress<\/code><\/a> are called. Callbacks are executed in the order they were added. Each callback is passed the <code>args<\/code> from the <code>.notifyWith()<\/code>. Any calls to <code>.notifyWith()<\/code> after a Deferred is resolved or rejected (or any progressCallbacks added after that) are ignored. For more information, see the documentation for <a href=\"\/category\/deferred-object\/\">Deferred object<\/a>.<\/p>\n  <\/div>\n<\/div><\/article>","protected":false},"excerpt":{"rendered":"<p>Call the progressCallbacks on a Deferred object with the given context and 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,97],"tags":[],"class_list":["post-156","post","type-post","status-publish","format-standard","hentry","category-deferred-object","category-97"],"_links":{"self":[{"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts\/156","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=156"}],"version-history":[{"count":1,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts\/156\/revisions"}],"predecessor-version":[{"id":157,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/posts\/156\/revisions\/157"}],"wp:attachment":[{"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/media?parent=156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/categories?post=156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/api.jquery.com\/wp-json\/wp\/v2\/tags?post=156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}