Pot.Deferred.callLazy

{Pot.Deferred} Pot.Deferred.callLazy ({Function} callback)

Pot.js と PotLite.js で利用可能。

関数 callback を非同期で実行します。

callLater と似ているところもありますが、
この関数は callLater(0, function() {...}) とするより速く実行されます。
オーバーヘッドが少ないので、単にバックグラウンドで実行したいときなどに適します。
返り値は callLater と同様 Pot.Deferred インスタンスになります。
then() などで繋げることもできます。
Pot.globalize() が適応済みの場合、Pot.Deferred.callLazy() が callLazy() で実行できます。

Pot.Deferred インスタンスを返します。

// 非同期で実行
Pot.Deferred.callLazy(function() {
    Pot.debug('hoge');
});
// チェインを繋げる場合
Pot.Deferred.callLazy(function() {
    Pot.debug('hoge');
}).then(function() {
    Pot.debug('fuga');
});