michael@0: /* michael@0: * Call the trap with the handler as the this value, the target as the first michael@0: * argument, and the name of the property as the second argument michael@0: */ michael@0: var target = {}; michael@0: var called = false; michael@0: var handler = { michael@0: getOwnPropertyDescriptor: function (target1, name) { michael@0: assertEq(this, handler); michael@0: assertEq(target1, target); michael@0: assertEq(name, 'foo'); michael@0: called = true; michael@0: } michael@0: }; michael@0: Object.getOwnPropertyDescriptor(new Proxy(target, handler), 'foo'); michael@0: assertEq(called, true);