diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-12-11 21:59:38 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-12-13 23:11:56 -0500 |
commit | 573f83b65a8a0f87def6f4200ce503d957464f0d (patch) | |
tree | 5b8c3b68a599fbc22e532df0a5fb25dd15550ae8 /ext/fg/js/popup-proxy-host.js | |
parent | b7144ed879a59b89ee11aa13702e89a6fdaa0e35 (diff) |
Update frontend API receiver handlers
Diffstat (limited to 'ext/fg/js/popup-proxy-host.js')
-rw-r--r-- | ext/fg/js/popup-proxy-host.js | 22 |
1 files changed, 11 insertions, 11 deletions
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) { |