JavaScript MochiKit.Async.Deferredã¯ããç¾æç¹ã§ã¯ã¾ãå©ç¨ã§ããªãå¤ããæ±ãããã®ã¯ã©ã¹ã§ãã 以ä¸ã®ããã«ãã³ã¼ã«ããã¯ã並ã¹ãã¤ãã³ããçºç«ãããã¨ãåã ã®è¿ãå¤ã次ã®ã³ã¼ã«ããã¯ã¸æ¸¡ããå®è¡ããã¦ããã¾ãã function increment(value){ alert(value); return value+1; } var d = new Deferred(); d.addCallback(increment); // alert(1) d.addCallback(increment); // alert(2) d.addCallback(increment); // alert(3) d.callback(1); ãã®æãã³ã¼ã«ããã¯ã¯ä»¥ä¸ã®ããã«ãã§ã¼ã³ãå½¢æãã¦ãã¾ãã(æ¬å½ã¯ã¨ã©ã¼ããã¯ãåããã¦ä¸ã¤ã®ãã§ã¼ã³ãå½¢æãã¦ããã®ã§ããã
{{#tags}}- {{label}}
{{/tags}}