Function javascriptcore_sys::JSObjectMakeConstructor
[−]
[src]
pub unsafe extern "C" fn JSObjectMakeConstructor(
ctx: JSContextRef,
jsClass: JSClassRef,
callAsConstructor: JSObjectCallAsConstructorCallback
) -> JSObjectRef
Convenience method for creating a JavaScript constructor.
ctx: The execution context to use.jsClass: AJSClassthat is the class your constructor will assign to the objects its constructs.jsClasswill be used to set the constructor's.prototypeproperty, and to evaluateinstanceofexpressions. PassNULLto use the default object class.callAsConstructorAJSObjectCallAsConstructorCallbackto invoke when your constructor is used in anewexpression. PassNULLto use the default object constructor.
Returns a JSObject that is a constructor. The object's
prototype will be the default object prototype.
The default object constructor takes no arguments and constructs
an object of class jsClass with no private data.