JavaScript-1.5 Reference

JS_CloneFunctionObject Function

Summary

Creates a new function object from an existing function structure.

Syntax

JSObject * JS_CloneFunctionObject(JSContext *cx,
    JSObject *funobj, JSObject *parent);

Description

JS_CloneFunctionObject creates a new function object. The new object shares an underlying function structure with funobj. funobj becomes the prototype for the newly cloned object, which means that its argument properties are not copied. The cloned object has parent as its parent object.

On success, JS_CloneFunctionObject returns a pointer to the newly created object. On failure, it returns NULL.

See Also

Groups [ Function ]
Documents [ LXR ID Search ]
Entries [ JS_GetFunctionObject ]

This page was generated by APIDOC