WIP: use es-modules

This commit is contained in:
j 2026-02-16 22:16:19 +01:00
commit 9c3450947b
146 changed files with 722 additions and 62 deletions

View file

@ -1,4 +1,5 @@
'use strict';
import Ox from './Namespace.js';
/*@
Ox.$ <f> Generic HTML element, mimics jQuery
@ -828,12 +829,12 @@ Ox.documentReady <function> Calls a callback function once the DOM is ready
@*/
Ox.documentReady = (function() {
var callbacks = [];
document.onreadystatechange = window.onload = function() {
document.onreadystatechange = globalThis.onload = function() {
if (document.readyState == 'complete') {
callbacks.forEach(function(callback) {
callback();
});
document.onreadystatechange = window.onload = null;
document.onreadystatechange = globalThis.onload = null;
}
};
return function(callback) {