mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
properly rewrite postmessage
This commit is contained in:
parent
34c3cc5094
commit
c2d147442e
9 changed files with 134 additions and 17 deletions
|
@ -25,7 +25,7 @@ export default function (client: ScramjetClient) {
|
|||
get(ctx) {
|
||||
const realwin = ctx.get() as Window;
|
||||
|
||||
if (ScramjetClient.SCRAMJET in realwin.self) {
|
||||
if (realwin && ScramjetClient.SCRAMJET in realwin.self) {
|
||||
return realwin.self[ScramjetClient.SCRAMJET].windowProxy;
|
||||
} else {
|
||||
// the opener has to have been already hooked, so if we reach here then it's a real window
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue