🐛 add proxy getOwnPropertyDescriptor in legacySandbox (#1074)

This commit is contained in:
Hydrogen 2020-11-16 14:26:05 +08:00 committed by GitHub
parent c52394a8b6
commit d12c05807d

View File

@ -122,6 +122,10 @@ export default class SingularProxySandbox implements SandBox {
has(_: Window, p: string | number | symbol): boolean { has(_: Window, p: string | number | symbol): boolean {
return p in rawWindow; return p in rawWindow;
}, },
getOwnPropertyDescriptor(_: Window, p: PropertyKey): PropertyDescriptor | undefined {
return Object.getOwnPropertyDescriptor(rawWindow, p);
},
}); });
this.proxy = proxy; this.proxy = proxy;