add mkAsync function
This commit is contained in:
@@ -2,6 +2,15 @@
|
||||
define([], function () {
|
||||
var Util = window.CryptPad_Util = {};
|
||||
|
||||
Util.mkAsync = function (f) {
|
||||
return function () {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
setTimeout(function () {
|
||||
f.apply(null, args);
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
// If once is true, after the event has been fired, any further handlers which are
|
||||
// registered will fire immediately, and this type of event cannot be fired twice.
|
||||
Util.mkEvent = function (once) {
|
||||
|
||||
Reference in New Issue
Block a user