Skip to content

JsCreatePropertyId

Limin Zhu edited this page Aug 6, 2018 · 2 revisions

Creates the property ID associated with the name.

Syntax

CHAKRA_API
       JsCreatePropertyId(
        _In_z_ const char *name,
        _In_ size_t length,
        _Out_ JsPropertyIdRef *propertyId);

Parameters

  • name: The name of the property ID to get or create. The string is expected to be ASCII / utf8 encoded. The name can be any JavaScript property identifier, including all digits.
  • length: Length of the name in bytes
  • propertyId: The property ID in this runtime for the given name

Return Value

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

Remarks

This API is experimental and may have breaking change later.

Requires an active script context.

Property IDs are specific to a context and cannot be used across contexts.

Clone this wiki locally