18 lines
437 B
JavaScript
18 lines
437 B
JavaScript
|
|
const init = [], initLoad = [];
|
||
|
|
window.Ox = function(value) {
|
||
|
|
console.log("delay stuff until we are done")
|
||
|
|
init.push(value)
|
||
|
|
};
|
||
|
|
window.Ox.load = function() {
|
||
|
|
initLoad.push(arguments)
|
||
|
|
};
|
||
|
|
|
||
|
|
(async () => {
|
||
|
|
const module = await import('./Ox/index.js');
|
||
|
|
console.log("Ox was loaded", init);
|
||
|
|
init.forEach(value => Ox(value))
|
||
|
|
delete init
|
||
|
|
initLoad.forEach(arguments => Ox.load.apply(null, arguments))
|
||
|
|
delete initLoad
|
||
|
|
})();
|
||
|
|
|