WIP: use es-modules
This commit is contained in:
parent
ec5b050496
commit
f70967f9bc
144 changed files with 741 additions and 57 deletions
18
source/Ox.compat.js
Normal file
18
source/Ox.compat.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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
|
||||
})();
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue