Use both shadowRoot and openOrClosedShadowRoot (#534)
This commit is contained in:
parent
f85508a25e
commit
dd6c3015c4
@ -105,7 +105,10 @@ class FrameOffsetForwarder {
|
|||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
|
|
||||||
const shadowRoot = element.shadowRoot;
|
const shadowRoot = (
|
||||||
|
element.shadowRoot ||
|
||||||
|
element.openOrClosedShadowRoot // Available to Firefox 63+ for WebExtensions
|
||||||
|
);
|
||||||
if (shadowRoot) {
|
if (shadowRoot) {
|
||||||
for (const child of shadowRoot.children) {
|
for (const child of shadowRoot.children) {
|
||||||
if (child.nodeType === ELEMENT_NODE) {
|
if (child.nodeType === ELEMENT_NODE) {
|
||||||
|
@ -530,7 +530,11 @@ class Popup {
|
|||||||
_getFrameParentElement() {
|
_getFrameParentElement() {
|
||||||
const defaultParent = document.body;
|
const defaultParent = document.body;
|
||||||
const fullscreenElement = DOM.getFullscreenElement();
|
const fullscreenElement = DOM.getFullscreenElement();
|
||||||
if (fullscreenElement === null || fullscreenElement.shadowRoot) {
|
if (
|
||||||
|
fullscreenElement === null ||
|
||||||
|
fullscreenElement.shadowRoot ||
|
||||||
|
fullscreenElement.openOrClosedShadowRoot // Available to Firefox 63+ for WebExtensions
|
||||||
|
) {
|
||||||
return defaultParent;
|
return defaultParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user