From 573f83b65a8a0f87def6f4200ce503d957464f0d Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 11 Dec 2019 21:59:38 -0500 Subject: Update frontend API receiver handlers --- ext/fg/js/popup-proxy-host.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'ext/fg/js/popup-proxy-host.js') diff --git a/ext/fg/js/popup-proxy-host.js b/ext/fg/js/popup-proxy-host.js index b2f18b97..de182afe 100644 --- a/ext/fg/js/popup-proxy-host.js +++ b/ext/fg/js/popup-proxy-host.js @@ -36,17 +36,17 @@ class PopupProxyHost { const {frameId} = await this.frameIdPromise; if (typeof frameId !== 'number') { return; } - this.apiReceiver = new FrontendApiReceiver(`popup-proxy-host#${frameId}`, { - createNestedPopup: ({parentId}) => this.createNestedPopup(parentId), - setOptions: ({id, options}) => this.setOptions(id, options), - hide: ({id, changeFocus}) => this.hide(id, changeFocus), - isVisibleAsync: ({id}) => this.isVisibleAsync(id), - setVisibleOverride: ({id, visible}) => this.setVisibleOverride(id, visible), - containsPoint: ({id, x, y}) => this.containsPoint(id, x, y), - showContent: ({id, elementRect, writingMode, type, details}) => this.showContent(id, elementRect, writingMode, type, details), - setCustomCss: ({id, css}) => this.setCustomCss(id, css), - clearAutoPlayTimer: ({id}) => this.clearAutoPlayTimer(id) - }); + this.apiReceiver = new FrontendApiReceiver(`popup-proxy-host#${frameId}`, new Map([ + ['createNestedPopup', ({parentId}) => this.createNestedPopup(parentId)], + ['setOptions', ({id, options}) => this.setOptions(id, options)], + ['hide', ({id, changeFocus}) => this.hide(id, changeFocus)], + ['isVisibleAsync', ({id}) => this.isVisibleAsync(id)], + ['setVisibleOverride', ({id, visible}) => this.setVisibleOverride(id, visible)], + ['containsPoint', ({id, x, y}) => this.containsPoint(id, x, y)], + ['showContent', ({id, elementRect, writingMode, type, details}) => this.showContent(id, elementRect, writingMode, type, details)], + ['setCustomCss', ({id, css}) => this.setCustomCss(id, css)], + ['clearAutoPlayTimer', ({id}) => this.clearAutoPlayTimer(id)] + ])); } createPopup(parentId, depth) { -- cgit v1.2.3