Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Proxy/isExtensible/trap-is-undefined.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 9.5.3
5 description: >
6 Return target.[[IsExtensible]]() if trap is undefined.
7 info: |
8 [[IsExtensible]] ( )
9
10 ...
11 7. If trap is undefined, then
12 a. Return target.[[IsExtensible]]().
13 ...
14 ---*/
15
16 var target = {};
17 var p = new Proxy(target, {});
18
19 assert.sameValue(Object.isExtensible(p), true);
20
21 Object.preventExtensions(target);
22
23 assert.sameValue(Object.isExtensible(p), false);