summaryrefslogtreecommitdiff
path: root/ext/bg/js/native-simple-dom-parser.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-12-14 23:05:04 -0500
committerGitHub <noreply@github.com>2020-12-14 23:05:04 -0500
commit26dd0270d9e8667237b4875ffce4b0c5a6a42621 (patch)
tree3cb23f3d8789d440a0b8de158bb5a33ae46ea66c /ext/bg/js/native-simple-dom-parser.js
parent7926821c48ad512b0c9bd2420216a36fe2237e4f (diff)
Create function to create a new DOM parser (#1114)
Diffstat (limited to 'ext/bg/js/native-simple-dom-parser.js')
-rw-r--r--ext/bg/js/native-simple-dom-parser.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/bg/js/native-simple-dom-parser.js b/ext/bg/js/native-simple-dom-parser.js
index 2aa4134d..4e0d89ea 100644
--- a/ext/bg/js/native-simple-dom-parser.js
+++ b/ext/bg/js/native-simple-dom-parser.js
@@ -43,4 +43,8 @@ class NativeSimpleDOMParser {
getTextContent(element) {
return element.textContent;
}
+
+ static isSupported() {
+ return typeof DOMParser !== 'undefined';
+ }
}