JsCreateNamedFunction Function
Creates a new JavaScript function with name.
Syntax
STDAPI_(JsErrorCode) JsCreateNamedFunction(
_In_ JsValueRef name,
_In_ JsNativeFunction nativeFunction,
_In_opt_ void *callbackState,
_Out_ JsValueRef *function
);
Parameters
name
The name of this function that will be used for diagnostics and stringification purposes.
nativeFunction
The method to call when the function is invoked.
callbackState
User provided state that will be passed back to the callback.
function
The new function object.
Return Value
Remarks
Requires an active script context.
This API is supported only in Microsoft Edge mode.
Requirements
Header: jsrt.h