Skip to content

JSValueScope constructor (1 of 2)

Creates a new instance of a JSValueScope with a specified scope type.

C#
public JSValueScope(JSValueScopeType scopeType = JSValueScopeType.Handle)
parameterdescription
scopeTypeThe type of scope to create; default is Handle.

See Also


JSValueScope constructor (2 of 2)

Creates a new instance of a JSValueScope, which may be a parentless scope with initial environment handle and JS runtime.

C#
public JSValueScope(JSValueScopeType scopeType, napi_env env, JSRuntime? runtime, 
    JSSynchronizationContext? synchronizationContext = null)
parameterdescription
scopeTypeThe type of scope to create.
envJS environment handle, required only for creating a scope without a parent, otherwise the environment is inherited from the parent scope.
runtimeJS runtime interface, required only for creating a scope without a parent, otherwise the JS runtime is inherited from the parent scope.
synchronizationContextOptional synchronization context to use for async operations; if omitted then a default synchronization context is used.

See Also

Released under the MIT license