michael@0: /* michael@0: * Call the trap with the handler as the this value, the target as the first michael@0: * argument, the original this value as the second argument, and the original michael@0: * arguments as the third argument. michael@0: */ michael@0: var target = function () {}; michael@0: var receiver = {}; michael@0: var handler = { michael@0: apply: function (target1, receiver1, args) { michael@0: assertEq(this, handler); michael@0: assertEq(target1, target); michael@0: assertEq(receiver1, receiver); michael@0: assertEq(args.length, 2); michael@0: assertEq(args[0], 2); michael@0: assertEq(args[1], 3); michael@0: } michael@0: } michael@0: new Proxy(target, handler).call(receiver, 2, 3);