properly? handle getOwnPropertyDescriptor

This commit is contained in:
velzie 2024-08-25 20:17:45 -04:00
parent e8b9e04d46
commit 8d2ab5ac8b
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F
6 changed files with 35 additions and 1 deletions

View file

@ -1,5 +1,6 @@
import { createDocumentProxy } from "./document";
import { createGlobalProxy } from "./global";
import { getOwnPropertyDescriptorHandler } from "./helpers";
import { createLocationProxy } from "./location";
import { CookieStore, decodeUrl } from "./shared";
@ -191,6 +192,7 @@ export class ScramjetClient {
};
}
h.getOwnPropertyDescriptor = getOwnPropertyDescriptorHandler;
target[prop] = new Proxy(value, h);
}
Trap<T>(name: string | string[], descriptor: Trap<T>): PropertyDescriptor {