Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

JsCreateEnhancedFunction

rhuanjl edited this page Sep 1, 2018 · 1 revision

Creates a new enhanced JavaScript function.

Syntax

CHAKRA_API
    JsCreateEnhancedFunction(
        _In_ JsEnhancedNativeFunction nativeFunction,
        _In_opt_ JsValueRef metadata,
        _In_opt_ void *callbackState,
        _Out_ JsValueRef *function);

Parameters

  • nativeFunction: The method to call when the function is invoked.
  • metadata: If this is not JS_INVALID_REFERENCE, it is converted to a string and used as the name of the function.
  • callbackState: User provided state that will be passed back to the callback.
  • function: The new function object.

Return Value

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

Remarks

This API is experimental and may have breaking changes later.

Requires an active script context.

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.