mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 22:40:01 -04:00
bug fixes
Co-authored-by: Avad3 <Avad3@users.noreply.github.com>
This commit is contained in:
parent
a39a2657c6
commit
47b59945a9
23 changed files with 385 additions and 327 deletions
|
@ -10,8 +10,13 @@ const windowProxy = new Proxy(window, {
|
|||
return target[prop];
|
||||
},
|
||||
|
||||
set(target, p, newValue, receiver) {
|
||||
return Reflect.set(target, p, newValue, receiver);
|
||||
set(target, prop, newValue) {
|
||||
// ensures that no apis are overwritten
|
||||
if (typeof prop === "string" && ["window", "top", "parent", "self", "globalThis", "location"].includes(prop)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return Reflect.set(target, prop, newValue);
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue