Skip to content

JsConstructObject

Limin Zhu edited this page Jul 6, 2017 · 3 revisions

Invokes a function as a constructor.

Syntax

STDAPI_(JsErrorCode)
    JsConstructObject(
    _In_ JsValueRef function,
    _In_reads_(argumentCount) JsValueRef *arguments,
    _In_ unsigned short argumentCount,
    _Out_ JsValueRef *result);

Parameters

  • function: The function to invoke as a constructor.
  • arguments: The arguments to the call (the first argument should be thisArg).
  • argumentCount: The number of arguments being passed in to the function.
  • result: The value returned from the function invocation.

Return Value

The code JsNoError if the operation succeeded, a failure code otherwise.

Remarks

Requires an active script context.

Clone this wiki locally