forked from FooSoft/yomichan
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -406,6 +406,7 @@ export class TextSourceGenerator { | |
return document.caretRangeFromPoint(x, y); | ||
} | ||
|
||
// @ts-expect-error - caretPositionFromPoint is non-standard | ||
Check failure on line 409 in ext/js/dom/text-source-generator.js GitHub Actions / Static Analysis
|
||
if (typeof document.caretPositionFromPoint === 'function') { | ||
// Firefox | ||
return this._caretPositionFromPoint(x, y); | ||
|
@@ -421,6 +422,7 @@ export class TextSourceGenerator { | |
* @returns {?Range} | ||
*/ | ||
_caretPositionFromPoint(x, y) { | ||
// @ts-expect-error - caretPositionFromPoint is non-standard | ||
Check failure on line 425 in ext/js/dom/text-source-generator.js GitHub Actions / Static Analysis
|
||
const position = /** @type {(x: number, y: number) => ?{offsetNode: Node, offset: number}} */ (document.caretPositionFromPoint)(x, y); | ||
if (position === null) { | ||
return null; | ||
|
@@ -473,6 +475,7 @@ export class TextSourceGenerator { | |
nextElement.style.setProperty('user-select', 'text', 'important'); | ||
} | ||
|
||
// @ts-expect-error - caretPositionFromPoint is non-standard | ||
Check failure on line 478 in ext/js/dom/text-source-generator.js GitHub Actions / Static Analysis
|
||
const position = /** @type {(x: number, y: number) => ?{offsetNode: Node, offset: number}} */ (document.caretPositionFromPoint)(x, y); | ||
if (position === null) { | ||
return null; | ||
|