No.
Object.getOwnPropertyNames()
returns both enumerated and non-enumerated native properties of an object. It is not possible to iterate over non-enumerable properties in ECMAScript 3rd Edition implementations, so you can only get those that are listed.
Itβs quite simple to write a procedure to return enumerated own properties:
var arr = []; for (var k in obj) { if (obj.hasOwnProperty(k)) arr.push(k); }
This is (more or less) the equivalent of Object.keys()
. If this is not enough, then you are out of luck.
source share