mirror of
https://github.com/hotomoe/hotomoe
synced 2024-11-25 15:46:17 +09:00
tweak boot.js
This commit is contained in:
parent
5fa8c62305
commit
44f560b453
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user