Skip to content

Commit

Permalink
Update WindowScript.js
Browse files Browse the repository at this point in the history
  • Loading branch information
NDevTK authored Nov 8, 2024
1 parent 3c01075 commit b67c938
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions WindowScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,14 @@
},
};
}

window.parent = new Proxy(window.parent, handle('parent'));
window.opener = new Proxy(window.opener, handle('opener'));

if (window.parent !== window) {
window.parent = new Proxy(window.parent, handle('parent'));
}

if (window.opener) {
window.opener = new Proxy(window.opener, handle('opener'));
}

window.postMessage = new Proxy(window.postMessage, handle('self'));
})();

0 comments on commit b67c938

Please sign in to comment.