From d12c05807de722d778d965f55b4e62b171415f3d Mon Sep 17 00:00:00 2001 From: Hydrogen Date: Mon, 16 Nov 2020 14:26:05 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20add=20proxy=20getOwnPropertyDesc?= =?UTF-8?q?riptor=20in=20legacySandbox=20(#1074)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sandbox/legacy/sandbox.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sandbox/legacy/sandbox.ts b/src/sandbox/legacy/sandbox.ts index 384389c..0440f0c 100644 --- a/src/sandbox/legacy/sandbox.ts +++ b/src/sandbox/legacy/sandbox.ts @@ -122,6 +122,10 @@ export default class SingularProxySandbox implements SandBox { has(_: Window, p: string | number | symbol): boolean { return p in rawWindow; }, + + getOwnPropertyDescriptor(_: Window, p: PropertyKey): PropertyDescriptor | undefined { + return Object.getOwnPropertyDescriptor(rawWindow, p); + }, }); this.proxy = proxy;