michael@0: // Return the trap result michael@0: var proxy = new Proxy(Object.create(Object.create(null, { michael@0: 'foo': { michael@0: configurable: true michael@0: } michael@0: }), { michael@0: 'bar': { michael@0: configurable: true michael@0: } michael@0: }), { michael@0: hasOwn: function (target, name) { michael@0: return name == 'foo'; michael@0: } michael@0: }); michael@0: assertEq(({}).hasOwnProperty.call(proxy, 'foo'), true); michael@0: assertEq(({}).hasOwnProperty.call(proxy, 'bar'), false);