JSObjectOps.enumerate

This template is obsolete. Do not use 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: Jorend
Last updated by: Jorend,