aboutsummaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/js/frame-offset-forwarder.js5
-rw-r--r--ext/fg/js/popup.js6
2 files changed, 9 insertions, 2 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) {
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index d45c7c2a..9e9debd8 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -530,7 +530,11 @@ class Popup {
_getFrameParentElement() {
const defaultParent = document.body;
const fullscreenElement = DOM.getFullscreenElement();
- if (fullscreenElement === null || fullscreenElement.shadowRoot) {
+ if (
+ fullscreenElement === null ||
+ fullscreenElement.shadowRoot ||
+ fullscreenElement.openOrClosedShadowRoot // Available to Firefox 63+ for WebExtensions
+ ) {
return defaultParent;
}