diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-12-14 23:05:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-14 23:05:04 -0500 |
commit | 26dd0270d9e8667237b4875ffce4b0c5a6a42621 (patch) | |
tree | 3cb23f3d8789d440a0b8de158bb5a33ae46ea66c /ext/bg/js/native-simple-dom-parser.js | |
parent | 7926821c48ad512b0c9bd2420216a36fe2237e4f (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.js | 4 |
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'; + } } |