aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/text-source-element.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-10-20 20:54:26 -0400
committerGitHub <noreply@github.com>2020-10-20 20:54:26 -0400
commit6f980d8f2be1714a29ceac1e402198f68b377880 (patch)
treeeea02fa59eabc24f9af5f9974badb9b30cc39fa6 /ext/fg/js/text-source-element.js
parent9bda0a9eb43e127fdaa0066fba7e3e73c9f74812 (diff)
Text source range refactor (#949)
* Rename functions for better clarity * Remove unused properties * Add getNodesInRange function * Improve ignore nodes check * Use private fields
Diffstat (limited to 'ext/fg/js/text-source-element.js')
-rw-r--r--ext/fg/js/text-source-element.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/fg/js/text-source-element.js b/ext/fg/js/text-source-element.js
index 16ac5cd5..983b0971 100644
--- a/ext/fg/js/text-source-element.js
+++ b/ext/fg/js/text-source-element.js
@@ -89,7 +89,7 @@ class TextSourceElement {
// NOP
}
- equals(other) {
+ hasSameStart(other) {
return (
typeof other === 'object' &&
other !== null &&
@@ -100,6 +100,10 @@ class TextSourceElement {
);
}
+ getNodesInRange() {
+ return [];
+ }
+
static getElementContent(element) {
let content;
switch (element.nodeName.toUpperCase()) {