mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-28 14:58:09 +09:00
tweak boot.js
This commit is contained in:
parent
cb84eec9f0
commit
2284142e58
@ -56,14 +56,23 @@
|
|||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region Script
|
//#region Script
|
||||||
window.addEventListener('DOMContentLoaded', () => {
|
function importAppScript() {
|
||||||
import(`/assets/${CLIENT_ENTRY}`)
|
import(`/assets/${CLIENT_ENTRY}`)
|
||||||
.catch(async e => {
|
.catch(async e => {
|
||||||
await checkUpdate();
|
await checkUpdate();
|
||||||
console.error(e);
|
console.error(e);
|
||||||
renderError('APP_IMPORT', e);
|
renderError('APP_IMPORT', e);
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
|
// タイミングによっては、この時点でDOMの構築が済んでいる場合とそうでない場合とがある
|
||||||
|
if (document.readyState !== 'loading') {
|
||||||
|
importAppScript();
|
||||||
|
} else {
|
||||||
|
window.addEventListener('DOMContentLoaded', () => {
|
||||||
|
importAppScript();
|
||||||
|
});
|
||||||
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region Theme
|
//#region Theme
|
||||||
|
Loading…
Reference in New Issue
Block a user