Skip to content

Commit

Permalink
#992@patch: Fixes problem where HTMLIFrameElement fails to load page …
Browse files Browse the repository at this point in the history
…in some frameworks. The problem is most likely that the Document.defaultView property is overridden somehow.
  • Loading branch information
capricorn86 committed Jul 17, 2023
1 parent 2e1d66e commit 16dcf3e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class HTMLIFrameUtility {
const src = element.src;

if (src) {
const contentWindow = new (<typeof Window>element.ownerDocument.defaultView.constructor)({
const contentWindow = new Window({
url: src,
settings: {
...element.ownerDocument.defaultView.happyDOM.settings
Expand Down

0 comments on commit 16dcf3e

Please sign in to comment.