已废弃
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()
静态方法通常返回目标对象自身和继承的可迭代属性的一个迭代器,在ECMAScript 2016中已被移除,在各浏览器中已被废弃。Reflect.enumerate(target)
target
目标对象自身和继承的可迭代属性的一个迭代器。
Reflect.enumerate()
方法返回目标对象自身和继承的可迭代属性的一个迭代器。
Reflect.enumerate()
var obj = { x: 1, y: 2 };
for (var name of Reflect.enumerate(obj)) {
console.log(name);
}
// logs "x" and "y"
Specification | Status | Comment |
---|---|---|
ECMAScript 2015 (6th Edition, ECMA-262) Reflect.enumerate |
Standard | 初始定义。ECMAScript 2016中已移除。 |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 未实现 | 未实现 | 未实现 | 未实现 | 未实现 |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | 未实现 | 未实现 | 未实现 | 未实现 | 未实现 | 未实现 |