Skip to content

JsCreateString

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

Create JavascriptString variable from ASCII or Utf8 string

Syntax

CHAKRA_API
    JsCreateString(
        _In_ const char *content,
        _In_ size_t length,
        _Out_ JsValueRef *value);

Parameters

  • content: Pointer to string memory.
  • length: Number of bytes within the string
  • value: JsValueRef representing the JavascriptString

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.

Input string can be either ASCII or Utf8.

Clone this wiki locally