The C-level API

The C-level extensibility API consists of the JSBool (*JSNative) function signature and the following functions:

typedef JSBool (*JSNative)(JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval)

Description

Method; describes C-level implementations of JavaScript functions in the following situations:

The function returns JS_TRUE if successful; JS_FALSE otherwise. If the function returns JS_FALSE, the current script stops executing and an error message appears.