Visit Mozilla.org

JS GetFunctionObject

From MDC

Retrieves the object for a specified function.

[edit] Syntax

JSObject * JS_GetFunctionObject(JSFunction *fun);
Name Type Description
fun JSFunction * Pointer to a JS function to obtain the JS object from.

[edit] Description

This page may be incorrect. It's also possible that this JSAPI function doesn't make much sense. Consider using something else.—jorendorff 14:20, 15 February 2008 (PST)

JS_GetFunctionObject retrieves the object for a specified function pointer, fun. All functions are associated with an underlying object. For functions you create with JS_NewFunction, the object is automatically created for you. For functions you define with JS_DefineFunction and JS_DefineFunctions, you specify the object(s) as a parameter.

JS_GetFunctionObject always returns a pointer to an object.

LXR ID Search for JS_GetFunctionObject