JsCreateFunction() private method

private JsCreateFunction ( JavaScriptNativeFunction nativeFunction, IntPtr externalData, JavaScriptValue &function ) : JavaScriptErrorCode
nativeFunction JavaScriptNativeFunction
externalData System.IntPtr
function JavaScriptValue
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);
        }