mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-16 15:40:02 -04:00
feat: add proxy and trapping checks
This commit is contained in:
parent
e0a88ad87c
commit
2b9afa1068
1 changed files with 2 additions and 0 deletions
|
@ -237,6 +237,7 @@ export class ScramjetClient {
|
|||
const split = name.split(".");
|
||||
const prop = split.pop();
|
||||
const target = split.reduce((a, b) => a?.[b], this.global);
|
||||
if (!target) return;
|
||||
const original = Reflect.get(target, prop);
|
||||
this.natives[name] = original;
|
||||
|
||||
|
@ -362,6 +363,7 @@ export class ScramjetClient {
|
|||
const split = name.split(".");
|
||||
const prop = split.pop();
|
||||
const target = split.reduce((a, b) => a?.[b], this.global);
|
||||
if (!target) return;
|
||||
|
||||
const original = nativeGetOwnPropertyDescriptor(target, prop);
|
||||
this.descriptors[name] = original;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue