| ||||||
SummaryPublic.Flag that indicates a property is visible to for and in loops. | ||||||
SyntaxJSPROP_ENUMERATE | ||||||
DescriptionJSPROP_ENUMERATE is a flag value that indicates a property belonging to a JS object is visible to for and in loops. JSPROP_ENUMERATE is used to set or clear the flags field in a JSPropertySpec structure so that a property can be made visible or invisible to loops.
| ||||||
ExampleThe following code fragment illustrates how JSPROP_ENUMERATE can be set for a property structure before you call JS_DefineProperties:JSPropertySpec MyProperty; . . . MyProperty.flags = MyProperty.flags | JSPROP_ENUMERATE; | ||||||
NotesProperty flags cannot be changed at run time. Instead, you either pass a set of flags as an argument toJS_DefineProperty to create a single property with
fixed flag values, or you set property flags in a JSPropertySpec struct which is
then passed to the JS_DefineProperties function to create multiple
properties on a single object.
| ||||||
See Also
|