summaryrefslogtreecommitdiff
path: root/ext/js/background/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r--ext/js/background/backend.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js
index 3eefed53..749c81a6 100644
--- a/ext/js/background/backend.js
+++ b/ext/js/background/backend.js
@@ -147,6 +147,7 @@ export class Backend {
/** @type {PermissionsUtil} */
this._permissionsUtil = new PermissionsUtil();
+ /* eslint-disable no-multi-spaces */
/** @type {import('backend').MessageHandlerMap} */
this._messageHandlers = new Map(/** @type {import('backend').MessageHandlerMapInit} */ ([
['requestBackendReadySignal', {async: false, contentScript: true, handler: this._onApiRequestBackendReadySignal.bind(this)}],
@@ -193,6 +194,7 @@ export class Backend {
['loadExtensionScripts', {async: true, contentScript: true, handler: this._onApiLoadExtensionScripts.bind(this)}],
['openCrossFramePort', {async: false, contentScript: true, handler: this._onApiOpenCrossFramePort.bind(this)}]
]));
+ /* eslint-enable no-multi-spaces */
/** @type {import('backend').MessageHandlerWithProgressMap} */
this._messageHandlersWithProgress = new Map(/** @type {import('backend').MessageHandlerWithProgressMapInit} */ ([
// Empty
@@ -201,10 +203,10 @@ export class Backend {
/** @type {Map<string, (params?: import('core').SerializableObject) => void>} */
this._commandHandlers = new Map(/** @type {[name: string, handler: (params?: import('core').SerializableObject) => void][]} */ ([
['toggleTextScanning', this._onCommandToggleTextScanning.bind(this)],
- ['openInfoPage', this._onCommandOpenInfoPage.bind(this)],
- ['openSettingsPage', this._onCommandOpenSettingsPage.bind(this)],
- ['openSearchPage', this._onCommandOpenSearchPage.bind(this)],
- ['openPopupWindow', this._onCommandOpenPopupWindow.bind(this)]
+ ['openInfoPage', this._onCommandOpenInfoPage.bind(this)],
+ ['openSettingsPage', this._onCommandOpenSettingsPage.bind(this)],
+ ['openSearchPage', this._onCommandOpenSearchPage.bind(this)],
+ ['openPopupWindow', this._onCommandOpenPopupWindow.bind(this)]
]));
}
@@ -805,7 +807,7 @@ export class Backend {
}
/** @type {import('api').Handler<import('api').GetOrCreateSearchPopupDetails, import('api').GetOrCreateSearchPopupResult>} */
- async _onApiGetOrCreateSearchPopup({focus=false, text}) {
+ async _onApiGetOrCreateSearchPopup({focus = false, text}) {
const {tab, created} = await this._getOrCreateSearchPopup();
if (focus === true || (focus === 'ifCreated' && created)) {
await this._focusTab(tab);
@@ -1979,7 +1981,7 @@ export class Backend {
* @param {?number} [timeout=null]
* @returns {Promise<void>}
*/
- _waitUntilTabFrameIsReady(tabId, frameId, timeout=null) {
+ _waitUntilTabFrameIsReady(tabId, frameId, timeout = null) {
return new Promise((resolve, reject) => {
/** @type {?import('core').Timeout} */
let timer = null;