diff --git a/src/sandbox/legacy/sandbox.ts b/src/sandbox/legacy/sandbox.ts index 0440f0c..8f5a586 100644 --- a/src/sandbox/legacy/sandbox.ts +++ b/src/sandbox/legacy/sandbox.ts @@ -124,7 +124,12 @@ export default class SingularProxySandbox implements SandBox { }, getOwnPropertyDescriptor(_: Window, p: PropertyKey): PropertyDescriptor | undefined { - return Object.getOwnPropertyDescriptor(rawWindow, p); + const descriptor = Object.getOwnPropertyDescriptor(rawWindow, p); + // A property cannot be reported as non-configurable, if it does not exists as an own property of the target object + if (descriptor && !descriptor.configurable) { + descriptor.configurable = true; + } + return descriptor; }, });