summaryrefslogtreecommitdiff
path: root/ext/fg/js/popup-proxy-host.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-05-02 12:50:44 -0400
committerGitHub <noreply@github.com>2020-05-02 12:50:44 -0400
commit6c341a13d813fc63b76fbbffe7920eeaf116d3a8 (patch)
treedf6f10e3e68bd22e50731af94fe5de328fe2a1da /ext/fg/js/popup-proxy-host.js
parentcae6b657ab418a1cafedcb1cf72d0e793fa5178b (diff)
Refactor frontend API classes (#482)
* Mark functions as private * Remove constructor side effects * Use safer handler invocation * Mark functions as private * Mark fields as private * Update BackendApiForwarder public API
Diffstat (limited to 'ext/fg/js/popup-proxy-host.js')
-rw-r--r--ext/fg/js/popup-proxy-host.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fg/js/popup-proxy-host.js b/ext/fg/js/popup-proxy-host.js
index d87553e6..39150bc7 100644
--- a/ext/fg/js/popup-proxy-host.js
+++ b/ext/fg/js/popup-proxy-host.js
@@ -24,7 +24,6 @@
class PopupProxyHost {
constructor() {
this._popups = new Map();
- this._apiReceiver = null;
this._frameId = null;
}
@@ -35,7 +34,7 @@ class PopupProxyHost {
if (typeof frameId !== 'number') { return; }
this._frameId = frameId;
- this._apiReceiver = new FrontendApiReceiver(`popup-proxy-host#${this._frameId}`, new Map([
+ const apiReceiver = new FrontendApiReceiver(`popup-proxy-host#${this._frameId}`, new Map([
['getOrCreatePopup', this._onApiGetOrCreatePopup.bind(this)],
['setOptionsContext', this._onApiSetOptionsContext.bind(this)],
['hide', this._onApiHide.bind(this)],
@@ -48,6 +47,7 @@ class PopupProxyHost {
['setContentScale', this._onApiSetContentScale.bind(this)],
['getHostUrl', this._onApiGetHostUrl.bind(this)]
]));
+ apiReceiver.prepare();
}
getOrCreatePopup(id=null, parentId=null, depth=null) {