mozilla

JSObjectOps.enumerate

Obsolete since JavaScript 1.8.5
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.

Warning: JSObjectOps is not a supported API. Details of the API may change from one release to the next. This documentation should be considered SpiderMonkey internals documentation, not API documentation. See bug 408416 for details.

The JSObjectOps.enumerate callback implements iteration over object properties. The type of the callback is JSNewEnumerateOp.

For native objects, the enumerate callback first checks the JSCLASS_NEW_ENUMERATE flag of the object's class. If the flag is present, enumerate simply delegates the call to JSClass.enumerate.

Otherwise, it invokes the JSClass.enumerate hook as an old-style JSEnumerateOp to give the object an opportunity to define any remaining lazy properties. Then it iterates over obj's defined properties, walking the internal data structure they're stored in.

Document Tags and Contributors

Contributors to this page: fscholz, Jorend, arai
Last updated by: arai,
Hide Sidebar