aboutsummaryrefslogtreecommitdiff
path: root/ext/js/app/popup-factory.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-02-14 15:53:35 -0500
committerGitHub <noreply@github.com>2021-02-14 15:53:35 -0500
commit286534e648af350d24fbf3c7892a7ec81aaeb4bd (patch)
tree89d88e961c5a0a6f508c66789e30b9ba4a968e73 /ext/js/app/popup-factory.js
parentefe8140f103179f50b610f182148b9427af99010 (diff)
Move api to yomichan object (#1392)
* Move cross frame API from API to Yomichan * Add API instance to Yomichan * Move api global to yomichan.api * Pass yomichan to API * Remove IIFE
Diffstat (limited to 'ext/js/app/popup-factory.js')
-rw-r--r--ext/js/app/popup-factory.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/js/app/popup-factory.js b/ext/js/app/popup-factory.js
index 7571d7ab..8f0c2a6e 100644
--- a/ext/js/app/popup-factory.js
+++ b/ext/js/app/popup-factory.js
@@ -20,7 +20,6 @@
* Popup
* PopupProxy
* PopupWindow
- * api
*/
class PopupFactory {
@@ -35,7 +34,7 @@ class PopupFactory {
prepare() {
this._frameOffsetForwarder.prepare();
- api.crossFrame.registerHandlers([
+ yomichan.crossFrame.registerHandlers([
['getOrCreatePopup', {async: true, handler: this._onApiGetOrCreatePopup.bind(this)}],
['setOptionsContext', {async: true, handler: this._onApiSetOptionsContext.bind(this)}],
['hide', {async: false, handler: this._onApiHide.bind(this)}],
@@ -132,7 +131,7 @@ class PopupFactory {
throw new Error('Invalid frameId');
}
const useFrameOffsetForwarder = (parentPopupId === null);
- ({id, depth, frameId} = await api.crossFrame.invoke(frameId, 'getOrCreatePopup', {
+ ({id, depth, frameId} = await yomichan.crossFrame.invoke(frameId, 'getOrCreatePopup', {
id,
parentPopupId,
frameId,