add frames to UNSAFE_GLOBALS

This commit is contained in:
velzie 2024-10-12 22:40:05 -04:00
parent 2923a5f275
commit add57d720b
No known key found for this signature in database
GPG key ID: AA51AEFB0A1F3820
2 changed files with 10 additions and 3 deletions

View file

@ -429,6 +429,7 @@ const UNSAFE_GLOBALS: [&str; 9] = [
"location", "location",
"document", "document",
"eval", "eval",
"frames",
]; ];
fn random_string() -> String { fn random_string() -> String {

View file

@ -14,9 +14,15 @@ export function createGlobalProxy(
if ( if (
typeof prop === "string" && 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]); return client.wrapfn(self[prop]);