Set URL before adding to the document
This commit is contained in:
parent
f019ab741a
commit
1c6ed1d286
@ -228,6 +228,7 @@ class Popup {
|
|||||||
|
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
const parentFrameId = (typeof this._frameId === 'number' ? this._frameId : null);
|
const parentFrameId = (typeof this._frameId === 'number' ? this._frameId : null);
|
||||||
|
this._container.setAttribute('src', chrome.runtime.getURL('/fg/float.html'));
|
||||||
this._container.addEventListener('load', () => {
|
this._container.addEventListener('load', () => {
|
||||||
const uniqueId = yomichan.generateId(32);
|
const uniqueId = yomichan.generateId(32);
|
||||||
Popup._listenForDisplayPrepareCompleted(uniqueId, resolve);
|
Popup._listenForDisplayPrepareCompleted(uniqueId, resolve);
|
||||||
@ -248,7 +249,6 @@ class Popup {
|
|||||||
this._observeFullscreen(true);
|
this._observeFullscreen(true);
|
||||||
this._onFullscreenChanged();
|
this._onFullscreenChanged();
|
||||||
this.setCustomOuterCss(this._options.general.customPopupOuterCss, false);
|
this.setCustomOuterCss(this._options.general.customPopupOuterCss, false);
|
||||||
this._container.setAttribute('src', chrome.runtime.getURL('/fg/float.html'));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user