summaryrefslogtreecommitdiff
path: root/ext/js/dom/document-util.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-12-20 00:37:34 -0500
committerGitHub <noreply@github.com>2023-12-20 05:37:34 +0000
commite8b4c488dd5955bafa3fbdbd71cb125f67486415 (patch)
treef3e5ed3ec5de4d5d33f4c5902eb4d0961cdd42e9 /ext/js/dom/document-util.js
parente56f03901f21fa8f44725b6a68d3d0dca1e9cd34 (diff)
Declare static fields using modern JavaScript syntax (#400)
Diffstat (limited to 'ext/js/dom/document-util.js')
-rw-r--r--ext/js/dom/document-util.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/ext/js/dom/document-util.js b/ext/js/dom/document-util.js
index d335eba3..df3bd354 100644
--- a/ext/js/dom/document-util.js
+++ b/ext/js/dom/document-util.js
@@ -24,6 +24,13 @@ import {TextSourceRange} from './text-source-range.js';
* This class contains utility functions related to the HTML document.
*/
export class DocumentUtil {
+ /** @type {RegExp} @readonly */
+ static _transparentColorPattern = /rgba\s*\([^)]*,\s*0(?:\.0+)?\s*\)/;
+ /** @type {?boolean} */
+ static _cssZoomSupported = null;
+ /** @type {import('document-util').GetRangeFromPointHandler[]} @readonly */
+ static _getRangeFromPointHandlers = [];
+
/**
* Scans the document for text or elements with text information at the given coordinate.
* Coordinates are provided in [client space](https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_View/Coordinate_systems).
@@ -1086,12 +1093,3 @@ export class DocumentUtil {
return (typeof style === 'object' && style !== null && typeof style.zoom === 'string');
}
}
-/** @type {RegExp} */
-// eslint-disable-next-line no-underscore-dangle
-DocumentUtil._transparentColorPattern = /rgba\s*\([^)]*,\s*0(?:\.0+)?\s*\)/;
-/** @type {?boolean} */
-// eslint-disable-next-line no-underscore-dangle
-DocumentUtil._cssZoomSupported = null;
-/** @type {import('document-util').GetRangeFromPointHandler[]} */
-// eslint-disable-next-line no-underscore-dangle
-DocumentUtil._getRangeFromPointHandlers = [];