Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

JS_FreezeObject

This article needs a technical review. How you can help.

This article covers features introduced in SpiderMonkey 1.8.5

Freeze an object.

Syntax

bool
JS_FreezeObject(JSContext *cx, JS::Handle<JSObject*> obj);
Name Type Description
cx JSContext * The context. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext.
obj JS::Handle<JSObject*> An object to freeze.

Description

Freezes an object. This means that other code cannot delete, add or change any properties on the object. See ES5's Object.freeze method.

See also

Document Tags and Contributors

 Contributors to this page: kscarfone, arai, Sheppy, markg
 Last updated by: kscarfone,