diff options
| author | Darius Jahandarie <djahandarie@gmail.com> | 2023-12-06 03:53:16 +0000 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-06 03:53:16 +0000 | 
| commit | bd5bc1a5db29903bc098995cd9262c4576bf76af (patch) | |
| tree | c9214189e0214480fcf6539ad1c6327aef6cbd1c /ext/js/pages/settings/popup-window-controller.js | |
| parent | fd6bba8a2a869eaf2b2c1fa49001f933fce3c618 (diff) | |
| parent | 23e6fb76319c9ed7c9bcdc3efba39bc5dd38f288 (diff) | |
Merge pull request #339 from toasted-nutbread/type-annotations
Type annotations
Diffstat (limited to 'ext/js/pages/settings/popup-window-controller.js')
| -rw-r--r-- | ext/js/pages/settings/popup-window-controller.js | 7 | 
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});      } |