aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/popup-proxy-host.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-03-19 00:24:14 +0200
committersiikamiika <siikamiika@users.noreply.github.com>2020-04-05 19:57:37 +0300
commitb6c4914b79d96b06760093be8957fbb1730eff3b (patch)
tree568288a7b81aae03343c4550ff8da104d0c6b03b /ext/fg/js/popup-proxy-host.js
parent6806e7055f312ad1ff382118255ffe1004b7eace (diff)
simplify popup prepare
Diffstat (limited to 'ext/fg/js/popup-proxy-host.js')
-rw-r--r--ext/fg/js/popup-proxy-host.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/fg/js/popup-proxy-host.js b/ext/fg/js/popup-proxy-host.js
index 6f1c13c6..4dc79943 100644
--- a/ext/fg/js/popup-proxy-host.js
+++ b/ext/fg/js/popup-proxy-host.js
@@ -26,17 +26,17 @@ class PopupProxyHost {
constructor() {
this._popups = new Map();
this._apiReceiver = null;
- this._frameIdPromise = null;
+ this._frameId = null;
}
// Public functions
async prepare() {
- this._frameIdPromise = apiFrameInformationGet();
- const {frameId} = await this._frameIdPromise;
+ const {frameId} = await apiFrameInformationGet();
if (typeof frameId !== 'number') { return; }
+ this._frameId = frameId;
- this._apiReceiver = new FrontendApiReceiver(`popup-proxy-host#${frameId}`, new Map([
+ this._apiReceiver = new FrontendApiReceiver(`popup-proxy-host#${this._frameId}`, new Map([
['getOrCreatePopup', this._onApiGetOrCreatePopup.bind(this)],
['setOptions', this._onApiSetOptions.bind(this)],
['hide', this._onApiHide.bind(this)],
@@ -87,7 +87,7 @@ class PopupProxyHost {
} else if (depth === null) {
depth = 0;
}
- const popup = new Popup(id, depth, this._frameIdPromise);
+ const popup = new Popup(id, depth, this._frameId);
if (parent !== null) {
popup.setParent(parent);
}