Skip to content

JsSerializedLoadScriptCallback

Alex Godoy Wolff edited this page Nov 16, 2016 · 2 revisions

Called by the runtime to load the source code of the serialized script.

Syntax

typedef bool (CHAKRA_CALLBACK * JsSerializedLoadScriptCallback) (JsSourceContext sourceContext, _Out_ JsValueRef *value, _Out_ JsParseScriptAttributes *parseAttributes);

Parameters

  • sourceContext: The context passed to Js[Parse|Run]SerializedScriptCallback
  • value: The script returned.
  • parseAttributes: Parse Attributes returned

Return Value

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

Remarks

The callback is invoked on the current runtime execution thread, therefore execution is blocked until the callback completes. The callback can be used by hosts to prepare for garbage collection. For example, by releasing unnecessary references on Chakra objects.

Clone this wiki locally