We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed0ebce commit 1c36b6eCopy full SHA for 1c36b6e
src/index.ts
@@ -68,7 +68,12 @@ function getFrameElement(el: Element) {
68
if (!el.ownerDocument || !el.ownerDocument.defaultView) {
69
return null
70
}
71
- return el.ownerDocument.defaultView.frameElement
+
72
+ try {
73
+ return el.ownerDocument.defaultView.frameElement
74
+ } catch (e) {
75
+ return null
76
+ }
77
78
79
function isHiddenByFrame(el: Element): boolean {
0 commit comments