Use both shadowRoot and openOrClosedShadowRoot (#534)
This commit is contained in:
parent
f85508a25e
commit
dd6c3015c4
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user