15.2.3.6-4-560.js (714B)
1 // Copyright (c) 2012 Ecma International. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 es5id: 15.2.3.6-4-560 6 description: > 7 ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a 8 Function, [[Enumerable]] is false, [[Configurable]] is false) is 9 undeletable 10 includes: [propertyHelper.js] 11 ---*/ 12 13 var obj = {}; 14 15 var getFunc = function() { 16 return 1001; 17 }; 18 19 var verifySetFunc = "data"; 20 var setFunc = function(value) { 21 verifySetFunc = value; 22 }; 23 24 Object.defineProperty(obj, "prop", { 25 get: getFunc, 26 set: setFunc, 27 enumerable: false, 28 configurable: false 29 }); 30 31 verifyProperty(obj, "prop", { 32 configurable: false, 33 }); 34 35 reportCompare(0, 0);