mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-14 09:45:46 +01:00
Cleanup/fixes.
This commit is contained in:
@@ -61,24 +61,6 @@ var Promises = Module("Promises", {
|
||||
mainThread.dispatch(accept, mainThread.DISPATCH_NORMAL);
|
||||
}),
|
||||
|
||||
/**
|
||||
* Returns a promise which resolves with the given argument.
|
||||
*/
|
||||
accept: function fail(arg) {
|
||||
let deferred = Promise.defer();
|
||||
deferred.resolve(arg);
|
||||
return deferred.promise;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns a promise which fails with the given argument.
|
||||
*/
|
||||
fail: function fail(arg) {
|
||||
let deferred = Promise.defer();
|
||||
deferred.reject(arg);
|
||||
return deferred.promise;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns a promise which resolves after the given number of
|
||||
* milliseconds.
|
||||
|
||||
Reference in New Issue
Block a user