-
Notifications
You must be signed in to change notification settings - Fork 0
promises
Kristof degrave edited this page Apr 12, 2017
·
1 revision
The linq2indexedDB.promises exposes an object which is a wrapper around a given promise object. This can be jQuery implementation or WinJS implementation. More information can be found on this blogpost.
It is also possible to plugin your own promise object.
Invoke the callback function inside the yout own promise. And provide an object with the following functions. All functions have 2 parameters, the context and an array args containing all arguments passed.
{{ function customPromise(callback) { return new CustomPromise(function(completed, error, progress) { callback({ complete: function(context, args) { completed(args); }, error: function(context, args) { error(args); }, progress: function(context, args) { progress(args); } }); }); }
linq2indexedDB.promises = { promise: customPromise }; }}