Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

deferred

Eser Ozvataf edited this page Jun 17, 2015 · 2 revisions

Deferred object manages the state of completed operations, and utilizes construction of event-driven callback queues.

Constructing a deferred object

Usage: new $l.deferred()

var promise = new $l.deferred();
promise.done(function (x) { console.log('result is ' + x); });

setTimeout(function () { promise.resolve(5); }, 200);
Clone this wiki locally