aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/frame-offset-forwarder.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-05-10 14:10:02 -0400
committerGitHub <noreply@github.com>2020-05-10 14:10:02 -0400
commitdd6c3015c4af6db5f1deca797366ed6269b7d82c (patch)
tree20724fc8f300ac7d6e9367639a751bb7c1d602bd /ext/fg/js/frame-offset-forwarder.js
parentf85508a25edb49de96bebb77a5832931f0819eff (diff)
Use both shadowRoot and openOrClosedShadowRoot (#534)
Diffstat (limited to 'ext/fg/js/frame-offset-forwarder.js')
-rw-r--r--ext/fg/js/frame-offset-forwarder.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/fg/js/frame-offset-forwarder.js b/ext/fg/js/frame-offset-forwarder.js
index 1a2f3e1e..9b68d34e 100644
--- a/ext/fg/js/frame-offset-forwarder.js
+++ b/ext/fg/js/frame-offset-forwarder.js
@@ -105,7 +105,10 @@ class FrameOffsetForwarder {
return element;
}
- const shadowRoot = element.shadowRoot;
+ const shadowRoot = (
+ element.shadowRoot ||
+ element.openOrClosedShadowRoot // Available to Firefox 63+ for WebExtensions
+ );
if (shadowRoot) {
for (const child of shadowRoot.children) {
if (child.nodeType === ELEMENT_NODE) {