From 1c6ed1d2866d9912b3b65d9e5addf710a6f26b38 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 16 Feb 2020 19:16:31 -0500 Subject: Set URL before adding to the document --- ext/fg/js/popup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/fg') diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js index de05f9f5..45203c03 100644 --- a/ext/fg/js/popup.js +++ b/ext/fg/js/popup.js @@ -228,6 +228,7 @@ class Popup { return new Promise((resolve) => { const parentFrameId = (typeof this._frameId === 'number' ? this._frameId : null); + this._container.setAttribute('src', chrome.runtime.getURL('/fg/float.html')); this._container.addEventListener('load', () => { const uniqueId = yomichan.generateId(32); Popup._listenForDisplayPrepareCompleted(uniqueId, resolve); @@ -248,7 +249,6 @@ class Popup { this._observeFullscreen(true); this._onFullscreenChanged(); this.setCustomOuterCss(this._options.general.customPopupOuterCss, false); - this._container.setAttribute('src', chrome.runtime.getURL('/fg/float.html')); }); } -- cgit v1.2.3