mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 22:40:01 -04:00
add frames to UNSAFE_GLOBALS
This commit is contained in:
parent
2923a5f275
commit
add57d720b
2 changed files with 10 additions and 3 deletions
|
@ -429,6 +429,7 @@ const UNSAFE_GLOBALS: [&str; 9] = [
|
|||
"location",
|
||||
"document",
|
||||
"eval",
|
||||
"frames",
|
||||
];
|
||||
|
||||
fn random_string() -> String {
|
||||
|
|
|
@ -14,9 +14,15 @@ export function createGlobalProxy(
|
|||
|
||||
if (
|
||||
typeof prop === "string" &&
|
||||
["window", "top", "self", "globalThis", "parent", "document"].includes(
|
||||
prop
|
||||
)
|
||||
[
|
||||
"window",
|
||||
"top",
|
||||
"self",
|
||||
"globalThis",
|
||||
"parent",
|
||||
"document",
|
||||
"frames",
|
||||
].includes(prop)
|
||||
)
|
||||
return client.wrapfn(self[prop]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue