Skip to content

JsCreateExternalObjectWithPrototype

rhuanjl edited this page Sep 1, 2018 · 1 revision

Creates a new object (with prototype) that stores some external data.

Syntax

CHAKRA_API
    JsCreateExternalObjectWithPrototype(
        _In_opt_ void *data,
        _In_opt_ JsFinalizeCallback finalizeCallback,
        _In_opt_ JsValueRef prototype,
        _Out_ JsValueRef *object);

Parameters

  • data: External data that the object will represent. May be null.
  • finalizeCallback: A callback for when the object is finalized. May be null.
  • prototype: Prototype object or nullptr.
  • object: The new object.

Return Value

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

Remarks

This API is experimental and may have breaking changes later.

Requires an active script context.

Clone this wiki locally