bug fixes

Co-authored-by: Avad3 <Avad3@users.noreply.github.com>
This commit is contained in:
Percs 2024-07-13 19:42:12 -05:00
parent a39a2657c6
commit 47b59945a9
23 changed files with 385 additions and 327 deletions

View file

@ -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);
},
});