Debian Codegraph @

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

raw
1 let proxy = new Proxy({
2 a: 1,
3 b: 2,
4 c: 3
5 }, {
6 enumerate() {
7 // Should not be invoked.
8 assertEq(false, true);
9 },
10
11 ownKeys() {
12 return ['a', 'b'];
13 }
14 });
15
16 let object = Object.create(proxy);
17 object.d = 4;
18
19 let a = [];
20 for (let x in object) {
21 a.push(x);
22 }
23 assertEq(a.toString(), "d,a,b");