aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/popup-window-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 12:48:14 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 12:48:14 -0500
commit4da4827bcbcdd1ef163f635d9b29416ff272b0bb (patch)
treea8a0f1a8befdb78a554e1be91f2c6059ca3ad5f9 /ext/js/pages/settings/popup-window-controller.js
parentfd6bba8a2a869eaf2b2c1fa49001f933fce3c618 (diff)
Add JSDoc type annotations to project (rebased)
Diffstat (limited to 'ext/js/pages/settings/popup-window-controller.js')
-rw-r--r--ext/js/pages/settings/popup-window-controller.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/js/pages/settings/popup-window-controller.js b/ext/js/pages/settings/popup-window-controller.js
index 9b6708d5..e1a5456b 100644
--- a/ext/js/pages/settings/popup-window-controller.js
+++ b/ext/js/pages/settings/popup-window-controller.js
@@ -19,18 +19,23 @@
import {yomitan} from '../../yomitan.js';
export class PopupWindowController {
+ /** */
prepare() {
- const testLink = document.querySelector('#test-window-open-link');
+ const testLink = /** @type {HTMLElement} */ (document.querySelector('#test-window-open-link'));
testLink.addEventListener('click', this._onTestWindowOpenLinkClick.bind(this), false);
}
// Private
+ /**
+ * @param {MouseEvent} e
+ */
_onTestWindowOpenLinkClick(e) {
e.preventDefault();
this._testWindowOpen();
}
+ /** */
async _testWindowOpen() {
await yomitan.api.getOrCreateSearchPopup({focus: true});
}