JSValueScope constructor (1 of 2)
Creates a new instance of a JSValueScope
with a specified scope type.
C#
public JSValueScope(JSValueScopeType scopeType = JSValueScopeType.Handle)
parameter | description |
---|---|
scopeType | The type of scope to create; default is Handle. |
See Also
- enum JSValueScopeType
- class JSValueScope
- namespace Microsoft.JavaScript.NodeApi
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)
parameter | description |
---|---|
scopeType | The type of scope to create. |
env | JS environment handle, required only for creating a scope without a parent, otherwise the environment is inherited from the parent scope. |
runtime | JS runtime interface, required only for creating a scope without a parent, otherwise the JS runtime is inherited from the parent scope. |
synchronizationContext | Optional synchronization context to use for async operations; if omitted then a default synchronization context is used. |
See Also
- enum JSValueScopeType
- struct napi_env
- class JSRuntime
- class JSSynchronizationContext
- class JSValueScope
- namespace Microsoft.JavaScript.NodeApi