Skip to content

Commit

Permalink
Types
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmaa committed Dec 16, 2024
1 parent 316ede0 commit a15be19
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion ext/js/dom/document-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
}
3 changes: 0 additions & 3 deletions ext/js/dom/text-source-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a15be19

Please sign in to comment.