Entry: JS_DeleteElement2 (Function)
Summary: Removes a specified element or numeric property from an object.
Syntax:
JSBool JS_DeleteElement2(JSContext *cx, JSObject *obj,
const char *name, jsval *rva);
Argument Type Description
cx JSContext * Pointer to a JS context from which to derive runtime information.
obj JSObject * Object from which to delete an element.
name const char * Name of the element to delete.
rval jsval * Pointer to the deleted value.
Description:
JS_DeleteElement2 removes a specified element, name, from an object, obj, and stores a pointer to the deleted element in rval. If rval is NULL, the element is deleted. If an object references an element belonging to a prototype, the element reference is removed from the object, but the prototype's element is not deleted. If deletion is successful, JS_DeleteElement2 returns JS_TRUE. Otherwise it returns JS_FALSE.
See also:
|
|
|