过时
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
静态
Reflect
.enumerate()
method used to return an iterator with the enumerable own and inherited properties of the target object, but
has been removed
in ECMAScript 2016 and is deprecated in browsers.
Reflect.enumerate(target)
target
The target object on which to get the property.
An iterator with the enumerable own and inherited properties of the target object.
A
TypeError
, if
target
is not an
Object
.
Reflect.enumerate
method returns an iterator with the enumerable own and inherited properties of the target object.
Reflect.enumerate()
var obj = { x: 1, y: 2 };
for (var name of Reflect.enumerate(obj)) {
console.log(name);
}
// logs "x" and "y"
Not part of any standard.
Not supported anywhere. Historically supported in Firefox 12 till 14.
Archive
Function
Object
Object.prototype.__defineGetter__()
Object.prototype.__defineSetter__()
Object.prototype.__lookupGetter__()
Object.prototype.__lookupSetter__()
Object.prototype.hasOwnProperty()
Object.prototype.isPrototypeOf()
Object.prototype.propertyIsEnumerable()
Object.prototype.toLocaleString()
Object.prototype.toSource()
Object.prototype.toString()
Object.prototype.unwatch()
Object.prototype.valueOf()
Object.prototype.watch()
Object.setPrototypeOf()