aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/popup-preview-frame.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/pages/settings/popup-preview-frame.js')
-rw-r--r--ext/js/pages/settings/popup-preview-frame.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/ext/js/pages/settings/popup-preview-frame.js b/ext/js/pages/settings/popup-preview-frame.js
index 7a899641..e9cfa541 100644
--- a/ext/js/pages/settings/popup-preview-frame.js
+++ b/ext/js/pages/settings/popup-preview-frame.js
@@ -20,16 +20,18 @@ import * as wanakana from '../../../lib/wanakana.js';
import {Frontend} from '../../app/frontend.js';
import {querySelectorNotNull} from '../../dom/query-selector.js';
import {TextSourceRange} from '../../dom/text-source-range.js';
-import {yomitan} from '../../yomitan.js';
export class PopupPreviewFrame {
/**
+ * @param {import('../../application.js').Application} application
* @param {number} tabId
* @param {number} frameId
* @param {import('../../app/popup-factory.js').PopupFactory} popupFactory
* @param {import('../../input/hotkey-handler.js').HotkeyHandler} hotkeyHandler
*/
- constructor(tabId, frameId, popupFactory, hotkeyHandler) {
+ constructor(application, tabId, frameId, popupFactory, hotkeyHandler) {
+ /** @type {import('../../application.js').Application} */
+ this._application = application;
/** @type {number} */
this._tabId = tabId;
/** @type {number} */
@@ -86,11 +88,12 @@ export class PopupPreviewFrame {
// Overwrite API functions
/** @type {?(optionsContext: import('settings').OptionsContext) => Promise<import('settings').ProfileOptions>} */
- this._apiOptionsGetOld = yomitan.api.optionsGet.bind(yomitan.api);
- yomitan.api.optionsGet = this._apiOptionsGet.bind(this);
+ this._apiOptionsGetOld = this._application.api.optionsGet.bind(this._application.api);
+ this._application.api.optionsGet = this._apiOptionsGet.bind(this);
// Overwrite frontend
this._frontend = new Frontend({
+ application: this._application,
tabId: this._tabId,
frameId: this._frameId,
popupFactory: this._popupFactory,