trap-is-undefined-no-property.js (431B)
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.9 5 description: > 6 [[Set]] ( P, V, Receiver) 7 8 8. If trap is undefined, then return target.[[Set]](P, V, Receiver). 9 10 features: [Proxy] 11 ---*/ 12 13 var target = { 14 attr: 1 15 }; 16 var p = new Proxy(target, {}); 17 18 p.attr = 2; 19 20 assert.sameValue(target.attr, 2); 21 22 reportCompare(0, 0);