Skip to content

JsGetPropertyIdFromName

Xiaoyin Liu edited this page Aug 22, 2017 · 3 revisions

Gets the property ID associated with the name.

Syntax

STDAPI_(JsErrorCode)
    JsGetPropertyIdFromName(
    _In_z_ const wchar_t *name,
    _Out_ JsPropertyIdRef *propertyId);

Parameters

  • name: The name of the property ID to get or create. The name may consist of only digits.
  • 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 Windows-only (see JsCreatePropertyId for cross-platform equivalent). Property IDs are specific to a context and cannot be used across contexts. Requires an active script context.

Clone this wiki locally