michael@0: // Return the names returned by the trap michael@0: var names = Object.keys(new Proxy(Object.create(Object.create(null, { michael@0: a: { michael@0: enumerable: true, michael@0: configurable: true michael@0: }, michael@0: b: { michael@0: enumerable: false, michael@0: configurable: true michael@0: } michael@0: }), { michael@0: c: { michael@0: enumerable: true, michael@0: configurable: true michael@0: }, michael@0: d: { michael@0: enumerable: false, michael@0: configurable: true michael@0: } michael@0: }), { michael@0: keys: function (target) { michael@0: return [ 'e' ]; michael@0: } michael@0: })); michael@0: assertEq(names.length, 1); michael@0: assertEq(names[0], 'e');