Debian Codegraph @

js/src/jit-test/tests/proxy/testDirectProxyHas1.js

raw
1 // Forward to the target if the trap is not defined
2 var proto = Object.create(null, {
3 'foo': {
4 configurable: true
5 }
6 });
7 var target = Object.create(proto, {
8 'bar': {
9 configurable: true
10 }
11 });
12
13 for (let p of [new Proxy(target, {}), Proxy.revocable(target, {}).proxy]) {
14 assertEq('foo' in p, true);
15 assertEq('bar' in p, true);
16 assertEq('baz' in p, false);
17 assertEq(Symbol() in p, false);
18 }