aboutsummaryrefslogtreecommitdiff
path: root/ext/js/app
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 19:33:01 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 19:33:01 -0500
commit14d12f6ba20b837a04c638b935773f3120e194ff (patch)
treedcd6b61d51ff39c97b60812b2bf3c8cd564347f8 /ext/js/app
parentd5b1217df3fe7480fc5f58fe194f5bbf73281094 (diff)
Update timer types and such
Diffstat (limited to 'ext/js/app')
-rw-r--r--ext/js/app/frontend.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/ext/js/app/frontend.js b/ext/js/app/frontend.js
index 628c504e..e1f8d8c9 100644
--- a/ext/js/app/frontend.js
+++ b/ext/js/app/frontend.js
@@ -99,7 +99,7 @@ export class Frontend {
this._popupEventListeners = new EventListenerCollection();
/** @type {?import('core').TokenObject} */
this._updatePopupToken = null;
- /** @type {?number} */
+ /** @type {?import('core').Timeout} */
this._clearSelectionTimer = null;
/** @type {boolean} */
this._isPointerOverPopup = false;
@@ -840,7 +840,7 @@ export class Frontend {
*/
async _waitForFrontendReady(frameId, timeout) {
return new Promise((resolve, reject) => {
- /** @type {?number} */
+ /** @type {?import('core').Timeout} */
let timeoutId = null;
const cleanup = () => {
@@ -973,6 +973,13 @@ export class Frontend {
await yomitan.api.loadExtensionScripts([
'/js/accessibility/google-docs-util.js'
]);
+ this._prepareGoogleDocs2();
+ }
+
+ /**
+ * @returns {Promise<void>}
+ */
+ async _prepareGoogleDocs2() {
if (typeof GoogleDocsUtil === 'undefined') { return; }
DocumentUtil.registerGetRangeFromPointHandler(GoogleDocsUtil.getRangeFromPoint.bind(GoogleDocsUtil));
}