diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-06-07 21:40:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-07 21:40:11 -0400 |
commit | 9767b765536279023045ed4280b12d297ec78f0a (patch) | |
tree | 672e5754ca6950dbca87e8aabc408ddeba21f9ae /ext/fg/js/popup-factory.js | |
parent | b614aca3ddd04b9d533959b2eabaa6db43b79f8f (diff) |
Use cross frame API (#553)
* Use new CrossFrameAPI for popup proxy communication
* Remove use of old cross-frame communication classes
* Remove use of old cross-frame communication files
* Make the crossFrame object a member of the api object
Diffstat (limited to 'ext/fg/js/popup-factory.js')
-rw-r--r-- | ext/fg/js/popup-factory.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/fg/js/popup-factory.js b/ext/fg/js/popup-factory.js index b10acbaf..b5997253 100644 --- a/ext/fg/js/popup-factory.js +++ b/ext/fg/js/popup-factory.js @@ -16,8 +16,8 @@ */ /* global - * FrontendApiReceiver * Popup + * api */ class PopupFactory { @@ -29,7 +29,7 @@ class PopupFactory { // Public functions async prepare() { - const apiReceiver = new FrontendApiReceiver(`popup-factory#${this._frameId}`, new Map([ + api.crossFrame.registerHandlers([ ['getOrCreatePopup', {async: false, handler: this._onApiGetOrCreatePopup.bind(this)}], ['setOptionsContext', {async: true, handler: this._onApiSetOptionsContext.bind(this)}], ['hide', {async: false, handler: this._onApiHide.bind(this)}], @@ -41,8 +41,7 @@ class PopupFactory { ['clearAutoPlayTimer', {async: false, handler: this._onApiClearAutoPlayTimer.bind(this)}], ['setContentScale', {async: false, handler: this._onApiSetContentScale.bind(this)}], ['getUrl', {async: false, handler: this._onApiGetUrl.bind(this)}] - ])); - apiReceiver.prepare(); + ]); } getOrCreatePopup(id=null, parentId=null, depth=null) { |