diff --git a/ext/js/dom/document-util.js b/ext/js/dom/document-util.js index 2dd3c2bc7..638801515 100644 --- a/ext/js/dom/document-util.js +++ b/ext/js/dom/document-util.js @@ -498,7 +498,6 @@ function computeCssZoomSupported() { return ( typeof style === 'object' && style !== null && - // @ts-expect-error - zoom is a non-standard property. typeof style.zoom === 'string' ); } diff --git a/ext/js/dom/text-source-generator.js b/ext/js/dom/text-source-generator.js index e3c6b4e1e..875ecc15e 100644 --- a/ext/js/dom/text-source-generator.js +++ b/ext/js/dom/text-source-generator.js @@ -406,7 +406,6 @@ export class TextSourceGenerator { return document.caretRangeFromPoint(x, y); } - // @ts-expect-error - caretPositionFromPoint is non-standard if (typeof document.caretPositionFromPoint === 'function') { // Firefox return this._caretPositionFromPoint(x, y); @@ -422,7 +421,6 @@ export class TextSourceGenerator { * @returns {?Range} */ _caretPositionFromPoint(x, y) { - // @ts-expect-error - caretPositionFromPoint is non-standard const position = /** @type {(x: number, y: number) => ?{offsetNode: Node, offset: number}} */ (document.caretPositionFromPoint)(x, y); if (position === null) { return null; @@ -475,7 +473,6 @@ export class TextSourceGenerator { nextElement.style.setProperty('user-select', 'text', 'important'); } - // @ts-expect-error - caretPositionFromPoint is non-standard const position = /** @type {(x: number, y: number) => ?{offsetNode: Node, offset: number}} */ (document.caretPositionFromPoint)(x, y); if (position === null) { return null;