Skip to content

JsCreatePropertyId

Xiaoyin Liu edited this page Aug 22, 2017 · 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 name may consist of only digits. The string is expected to be ASCII / utf8 encoded.
  • 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