mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 15:00:01 -04:00
use unproxy instead of replacing this on the windowprxy
This commit is contained in:
parent
12b17bc3b4
commit
7289a329c4
4 changed files with 50 additions and 41 deletions
|
@ -24,15 +24,6 @@ export function createWindowProxy(
|
|||
|
||||
const value = Reflect.get(target, prop);
|
||||
|
||||
// this is bad! i don't know what the right thing to do is
|
||||
if (typeof value === "function") {
|
||||
return new Proxy(value, {
|
||||
apply(_target, thisArg, argArray) {
|
||||
return value.apply(self, argArray);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return value;
|
||||
},
|
||||
|
||||
|
@ -74,14 +65,6 @@ export function createDocumentProxy(
|
|||
|
||||
const value = Reflect.get(target, prop);
|
||||
|
||||
if (typeof value === "function") {
|
||||
return new Proxy(value, {
|
||||
apply(_target, thisArg, argArray) {
|
||||
return value.apply(self.document, argArray);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return value;
|
||||
},
|
||||
set(target, prop, newValue) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue