1
0
Fork 0
mirror of synced 2024-07-09 16:36:09 +12:00
appwrite/public/scripts/services/di.js
2019-05-09 11:01:51 +03:00

30 lines
699 B
JavaScript

(function (window) {
"use strict";
window.ls.container.set('di', function () {
var list = {
'load': true
};
return {
listen: function (event, callback) {
if(list[event]) {
callback();
}
document.addEventListener(event, callback);
},
report: function (event) {
list[event] = true;
},
check: function(event) {
return (list[event]);
},
reset: function () {
list = {'load': true};
},
list: list
};
}, true);
})(window);