Skip to content
Snippets Groups Projects
Commit 44f560b4 authored by syuilo's avatar syuilo
Browse files

tweak boot.js

parent 5fa8c623
No related branches found
No related tags found
No related merge requests found
......@@ -56,14 +56,23 @@
//#endregion
//#region Script
window.addEventListener('DOMContentLoaded', () => {
function importAppScript() {
import(`/assets/${CLIENT_ENTRY}`)
.catch(async e => {
await checkUpdate();
console.error(e);
renderError('APP_IMPORT', e);
});
});
}
// タイミングによっては、この時点でDOMの構築が済んでいる場合とそうでない場合とがある
if (document.readyState !== 'loading') {
importAppScript();
} else {
window.addEventListener('DOMContentLoaded', () => {
importAppScript();
});
}
//#endregion
//#region Theme
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment