| 1 |
// Copyright (C) 2015 the V8 project authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
/*--- |
| 4 |
es6id: 9.5.13 |
| 5 |
description: > |
| 6 |
Return the result from the trap method. |
| 7 |
info: | |
| 8 |
[[Call]] (thisArgument, argumentsList) |
| 9 |
|
| 10 |
9. Return Call(trap, handler, «target, thisArgument, argArray»). |
| 11 |
---*/ |
| 12 |
|
| 13 |
var target = function(a, b) { |
| 14 |
return a + b; |
| 15 |
}; |
| 16 |
var result = {}; |
| 17 |
var handler = { |
| 18 |
apply: function(t, c, args) { |
| 19 |
return result; |
| 20 |
} |
| 21 |
}; |
| 22 |
var p = new Proxy(target, handler); |
| 23 |
|
| 24 |
assert.sameValue(p.call(), result); |