conditional reference to HTMLIFrameElement
This will prevent an exception being thrown in workers.
This commit is contained in:
parent
26d17cd241
commit
602414a586
1 changed files with 7 additions and 4 deletions
|
|
@ -700,7 +700,10 @@ function __uvHook(window, config = {}, bare = '/bare/') {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const contentWindowGet = Object.getOwnPropertyDescriptor(
|
// HTMLIFrameElement may not be defined (workers)
|
||||||
|
const contentWindowGet =
|
||||||
|
HTMLIFrameElement &&
|
||||||
|
Object.getOwnPropertyDescriptor(
|
||||||
HTMLIFrameElement.prototype,
|
HTMLIFrameElement.prototype,
|
||||||
'contentWindow'
|
'contentWindow'
|
||||||
).get;
|
).get;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue