blob: 01395624e3296c18b2067f66df1234cfce9638c3 (
plain)
1
2
3
4
5
6
|
load(libdir + "asserts.js");
// Throw a TypeError if the object refuses to be made non-extensible
var handler = { preventExtensions: () => false };
for (let p of [new Proxy({}, handler), Proxy.revocable({}, handler).proxy])
assertThrowsInstanceOf(() => Object.preventExtensions(p), TypeError);
|