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_GetFunctionPrototype

This article covers features introduced in SpiderMonkey 17

Retrieves the original, canonical Function.prototype for an object's global object.

Syntax

JSObject *
JS_GetFunctionPrototype(JSContext *cx, JS::HandleObject forObj);
Name Type Description
cx JSContext * Pointer to a JavaScript context from which to derive runtime information. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext.
forObj JS::HandleObject An object from the global whose Function.prototype is being retrieved.

Description

JS_GetFunctionPrototype() retrieves the original Function.prototype of a specified object, obj.  If an error occurs, it returns NULL.

Note: This expression might have different values over time if the global Function property is modified, but this method returns only the original value.

See Also

Document Tags and Contributors

 Contributors to this page: arai, fscholz, Bzbarsky
 Last updated by: arai,