refactor(js): avoid use of window.XXX and move to import/export
- change worker: do not cache html pages (not necessary) - remove use of window.XXX and maximize import/export, this will provide more clarety, show circular dependencies + you will benefit IDE help
This commit is contained in:
Vendored
+4
-7
@@ -2,13 +2,10 @@
|
||||
* OxiCloud - App bootstrap
|
||||
* Isolated startup trigger for the main application initializer.
|
||||
*/
|
||||
import { initApp } from './main.js';
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
if (typeof window.initApp === 'function') {
|
||||
window.initApp();
|
||||
}
|
||||
});
|
||||
} else if (typeof window.initApp === 'function') {
|
||||
window.initApp();
|
||||
document.addEventListener('DOMContentLoaded', initApp);
|
||||
} else {
|
||||
initApp();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user