mirror of
https://github.com/chinchang/web-maker.git
synced 2025-06-07 10:06:08 +02:00
deferred.js: add comments
This commit is contained in:
parent
b7fb978731
commit
abccf89b97
@ -6,7 +6,9 @@
|
|||||||
d.reject = reject;
|
d.reject = reject;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Add the native promise as a key on deferred object.
|
||||||
d.promise = promise;
|
d.promise = promise;
|
||||||
|
// Also move all props/methods of native promise on the deferred obj.
|
||||||
return Object.assign(d, promise);
|
return Object.assign(d, promise);
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user