summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/proxy/testDirectProxyGet1.js
blob: 43cb5385d0444d1b8ccaeb41278851a186b51ace (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Forward to the target if the trap is not defined
var target = { foo: 'bar' };
for (let p of [new Proxy(target, {}), Proxy.revocable(target, {}).proxy]) {
    assertEq(p.foo, 'bar');
    assertEq(p['foo'], 'bar');
}

var s = Symbol.for("moon");
var obj = {};
obj[s] = "dust";
for (let p of [new Proxy(obj, {}), Proxy.revocable(obj, {}).proxy])
    assertEq(p[s], "dust");