JsConstructObject() private method

private JsConstructObject ( IeJsValue function, IeJsValue arguments, ushort argumentCount, IeJsValue &result ) : JsErrorCode
function IeJsValue
arguments IeJsValue
argumentCount ushort
result IeJsValue
return JsErrorCode
Example #1
0
        /// <summary>
        /// Invokes a function as a constructor
        /// </summary>
        /// <remarks>
        /// Requires an active script context.
        /// </remarks>
        /// <param name="arguments">The arguments to the call</param>
        /// <returns>The <c>Value</c> returned from the function invocation</returns>
        public IeJsValue ConstructObject(params IeJsValue[] arguments)
        {
            IeJsValue returnReference;

            if (arguments.Length > ushort.MaxValue)
            {
                throw new ArgumentOutOfRangeException("arguments");
            }

            IeJsErrorHelpers.ThrowIfError(IeNativeMethods.JsConstructObject(this, arguments, (ushort)arguments.Length, out returnReference));

            return(returnReference);
        }