private JsCreateFunction ( JavaScriptNativeFunction nativeFunction, |
||
nativeFunction | JavaScriptNativeFunction | |
externalData | ||
function | ||
return | JavaScriptErrorCode |
/// <summary> /// Creates a new JavaScript function. /// </summary> /// <remarks> /// Requires an active script context. /// </remarks> /// <param name="function">The method to call when the function is invoked.</param> /// <param name="callbackData">Data to be provided to all function callbacks.</param> /// <returns>The new function object.</returns> public static JavaScriptValue CreateFunction(JavaScriptNativeFunction function, IntPtr callbackData) { JavaScriptValue reference; Native.ThrowIfError(Native.JsCreateFunction(function, callbackData, out reference)); return(reference); }