whenに渡したdeferredをnotifyWithした時に、when()の戻り値から追加したprogressフィルタが実行されるが、その中のthisがrejectWithで指定したものになっていない。notify時と同様にnotifyしたdfdオブジェクトになっている。
jQuery.whenのprogressは、whenに渡したものからnotifyWithを呼ぶと、thisが配列にになる。
var context;
$.when(df1, df2).progress(function(){ context = this; });
df1.notifyWith({a:1});
// context [{a:1}, undefined]
df2.notifyWith({b:1});
// context [{a:1}, {b:1}]
jQuery.whenと同じような挙動にする。
whenに渡したdeferredをnotifyWithした時に、when()の戻り値から追加したprogressフィルタが実行されるが、その中のthisがrejectWithで指定したものになっていない。notify時と同様にnotifyしたdfdオブジェクトになっている。
jQuery.whenのprogressは、whenに渡したものからnotifyWithを呼ぶと、thisが配列にになる。
jQuery.whenと同じような挙動にする。