never make two app div
This commit is contained in:
parent
e0740f93d0
commit
dd5e493ab5
2 changed files with 19 additions and 10 deletions
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
// ブロックの中に入れないと、定義した変数がブラウザのグローバルスコープに登録されてしまい邪魔なので
|
||||
(async () => {
|
||||
console.log('boot!')
|
||||
window.onerror = (e) => {
|
||||
renderError('SOMETHING_HAPPENED', e.toString());
|
||||
};
|
||||
|
|
@ -58,14 +59,11 @@
|
|||
? `?salt=${localStorage.getItem('salt')}`
|
||||
: '';
|
||||
|
||||
const script = document.createElement('script');
|
||||
script.setAttribute('src', `/assets/${CLIENT_ENTRY}${salt}`);
|
||||
script.setAttribute('type', 'module');
|
||||
script.addEventListener('error', async () => {
|
||||
await checkUpdate();
|
||||
renderError('APP_FETCH_FAILED');
|
||||
});
|
||||
document.head.appendChild(script);
|
||||
import(`/assets/${CLIENT_ENTRY}${salt}`)
|
||||
.catch(async () => {
|
||||
await checkUpdate();
|
||||
renderError('APP_FETCH_FAILED');
|
||||
})
|
||||
//#endregion
|
||||
|
||||
//#region Theme
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue