summaryrefslogtreecommitdiff
path: root/ext/fg/js/popup-proxy-host.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-15 17:07:19 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-16 19:54:41 -0500
commit2c3a145866106940682dc8a4a1e2377f8ab63013 (patch)
tree1adaff2729e65a3021baa1f1c87d6e5a00099d68 /ext/fg/js/popup-proxy-host.js
parent8a127e07f32545fdb45e2e8afba4dedd0ae5b955 (diff)
Mark private members
Diffstat (limited to 'ext/fg/js/popup-proxy-host.js')
-rw-r--r--ext/fg/js/popup-proxy-host.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/ext/fg/js/popup-proxy-host.js b/ext/fg/js/popup-proxy-host.js
index c7c15efe..ea343c19 100644
--- a/ext/fg/js/popup-proxy-host.js
+++ b/ext/fg/js/popup-proxy-host.js
@@ -19,10 +19,10 @@
class PopupProxyHost {
constructor() {
- this.popups = new Map();
- this.nextId = 0;
- this.apiReceiver = null;
- this.frameIdPromise = null;
+ this._popups = new Map();
+ this._nextId = 0;
+ this._apiReceiver = null;
+ this._frameIdPromise = null;
}
// Public functions
@@ -34,11 +34,11 @@ class PopupProxyHost {
}
async prepare() {
- this.frameIdPromise = apiFrameInformationGet();
- const {frameId} = await this.frameIdPromise;
+ this._frameIdPromise = apiFrameInformationGet();
+ const {frameId} = await this._frameIdPromise;
if (typeof frameId !== 'number') { return; }
- this.apiReceiver = new FrontendApiReceiver(`popup-proxy-host#${frameId}`, new Map([
+ this._apiReceiver = new FrontendApiReceiver(`popup-proxy-host#${frameId}`, new Map([
['createNestedPopup', ({parentId}) => this._onApiCreateNestedPopup(parentId)],
['setOptions', ({id, options}) => this._onApiSetOptions(id, options)],
['hide', ({id, changeFocus}) => this._onApiHide(id, changeFocus)],
@@ -52,18 +52,18 @@ class PopupProxyHost {
}
createPopup(parentId, depth) {
- const parent = (typeof parentId === 'string' && this.popups.has(parentId) ? this.popups.get(parentId) : null);
- const id = `${this.nextId}`;
+ const parent = (typeof parentId === 'string' && this._popups.has(parentId) ? this._popups.get(parentId) : null);
+ const id = `${this._nextId}`;
if (parent !== null) {
depth = parent.depth + 1;
}
- ++this.nextId;
- const popup = new Popup(id, depth, this.frameIdPromise);
+ ++this._nextId;
+ const popup = new Popup(id, depth, this._frameIdPromise);
if (parent !== null) {
popup.parent = parent;
parent.child = popup;
}
- this.popups.set(id, popup);
+ this._popups.set(id, popup);
return popup;
}
@@ -118,7 +118,7 @@ class PopupProxyHost {
// Private functions
_getPopup(id) {
- const popup = this.popups.get(id);
+ const popup = this._popups.get(id);
if (typeof popup === 'undefined') {
throw new Error('Invalid popup ID');
}