aboutsummaryrefslogtreecommitdiff
path: root/ext/js/dom
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-24 23:47:57 -0500
committerGitHub <noreply@github.com>2024-02-25 04:47:57 +0000
commit73169f06dff767020718a5715eba97d3575ba7e1 (patch)
tree99d458f9d2ca74e67dbb4bccd148ef549f7ce2cf /ext/js/dom
parenta21948daf6210f67955ae4f98a81e21b8cf9f1f2 (diff)
Turn on @typescript-eslint/no-unsafe-argument (#728)24.2.26.0
Diffstat (limited to 'ext/js/dom')
-rw-r--r--ext/js/dom/text-source-generator.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/js/dom/text-source-generator.js b/ext/js/dom/text-source-generator.js
index 68bf036a..c4711411 100644
--- a/ext/js/dom/text-source-generator.js
+++ b/ext/js/dom/text-source-generator.js
@@ -462,6 +462,7 @@ export class TextSourceGenerator {
* @returns {?Range}
*/
_caretPositionFromPointNormalizeStyles(x, y, nextElement) {
+ /** @type {Map<Element, ?string>} */
const previousStyles = new Map();
try {
while (true) {
@@ -490,7 +491,7 @@ export class TextSourceGenerator {
// Elements with user-select: all will return the element
// instead of a text point inside the element.
if (this._isElementUserSelectAll(/** @type {Element} */ (node))) {
- if (previousStyles.has(node)) {
+ if (previousStyles.has(/** @type {Element} */ (node))) {
// Recursive
return null;
}
@@ -524,6 +525,7 @@ export class TextSourceGenerator {
* @returns {?Range}
*/
_caretRangeFromPointExt(x, y, elements, normalizeCssZoom) {
+ /** @type {?Map<Element, ?string>} */
let previousStyles = null;
try {
let i = 0;