deferred.notifyWith()【Deferred 状態通知 (this参照指定)】

メモ

構文

説明構文戻り値
Deferred 状態通知 (this参照指定) deferred.notifyWith( context [, args ] ) 1.7

Object contextprogressCallbacks で this 参照されるオブジェクト
Array argsprogressCallbacks に渡される引数配列
Deferred

関連

<p id="output" style="border:1px black solid; padding:1px 5px;">【出力】</p>

<script>
var funcProgress1 = function(p) { $("#output").append('<br>funcProgress1 ("' + p + '") ' + this.state()); };
var funcProgress2 = function(p) { $("#output").append('<br>funcProgress2 ("' + p + '") ' + this.state()); };
var funcProgress3 = function(p) { $("#output").append('<br>funcProgress3 ("' + p + '") ' + this.state()); };

var df = $.Deferred();
df.progress( funcProgress1, funcProgress2 )
df.notifyWith(df, [ "param" ] );
df.progress( funcProgress3 );
</script>

【出力】