mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 11:23:08 +02:00
parent
3053767c71
commit
1ba559a98b
1 changed files with 0 additions and 8 deletions
|
@ -216,26 +216,18 @@ console.info('13');
|
||||||
// https://github.com/misskey-dev/misskey/pull/8575#issuecomment-1114239210
|
// https://github.com/misskey-dev/misskey/pull/8575#issuecomment-1114239210
|
||||||
// なぜかinit.tsの内容が2回実行されることがあるため、mountするdivを1つに制限する
|
// なぜかinit.tsの内容が2回実行されることがあるため、mountするdivを1つに制限する
|
||||||
const rootEl = (() => {
|
const rootEl = (() => {
|
||||||
console.info('13-1');
|
|
||||||
const MISSKEY_MOUNT_DIV_ID = 'misskey_app';
|
const MISSKEY_MOUNT_DIV_ID = 'misskey_app';
|
||||||
console.info('13-2');
|
|
||||||
|
|
||||||
const currentEl = document.getElementById(MISSKEY_MOUNT_DIV_ID);
|
const currentEl = document.getElementById(MISSKEY_MOUNT_DIV_ID);
|
||||||
console.info('13-3');
|
|
||||||
|
|
||||||
if (currentEl) {
|
if (currentEl) {
|
||||||
console.info('13-4');
|
|
||||||
console.warn('multiple import detected');
|
console.warn('multiple import detected');
|
||||||
return currentEl;
|
return currentEl;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.info('13-5');
|
|
||||||
const rootEl = document.createElement('div');
|
const rootEl = document.createElement('div');
|
||||||
console.info('13-6');
|
|
||||||
rootEl.id = MISSKEY_MOUNT_DIV_ID;
|
rootEl.id = MISSKEY_MOUNT_DIV_ID;
|
||||||
console.info('13-7');
|
|
||||||
document.body.appendChild(rootEl);
|
document.body.appendChild(rootEl);
|
||||||
console.info('13-8');
|
|
||||||
return rootEl;
|
return rootEl;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue