mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 14:30:02 -04:00
return real window.parent
This commit is contained in:
parent
396170e4ea
commit
b0f5166916
4 changed files with 62 additions and 38 deletions
|
@ -1,5 +1,6 @@
|
|||
import { encodeUrl } from "../shared/rewriters/url";
|
||||
import { ScramjetClient } from "./client";
|
||||
import { wrapfn } from "./shared/wrap";
|
||||
|
||||
export function createWindowProxy(
|
||||
client: ScramjetClient,
|
||||
|
@ -12,11 +13,9 @@ export function createWindowProxy(
|
|||
return client.locationProxy;
|
||||
} else if (
|
||||
propIsString &&
|
||||
["window", "top", "self", "globalThis"].includes(prop)
|
||||
["window", "top", "self", "globalThis", "parent"].includes(prop)
|
||||
) {
|
||||
return client.windowProxy;
|
||||
} else if (propIsString && prop == "parent") {
|
||||
return self.parent;
|
||||
return self[wrapfn](self[prop]);
|
||||
} else if (propIsString && prop === "$scramjet") {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue