V8ScriptEngineFlags Enumeration |
Defines options for initializing a new V8 JavaScript engine instance.
Namespace: Microsoft.ClearScript.V8Assembly: ClearScript.V8 (in ClearScript.V8.dll) Version: 7.4.5
Syntax [FlagsAttribute]
public enum V8ScriptEngineFlags
<FlagsAttribute>
Public Enumeration V8ScriptEngineFlags
[FlagsAttribute]
public enum class V8ScriptEngineFlags
[<FlagsAttribute>]
type V8ScriptEngineFlags
Members Member name | Value | Description |
---|
None | 0 |
Specifies that no options are selected.
|
EnableDebugging | 1 |
Specifies that script debugging features are to be enabled.
|
DisableGlobalMembers | 2 |
Specifies that support for GlobalMembers behavior is to be
disabled. This option yields a significant performance benefit for global item access.
|
EnableRemoteDebugging | 4 |
Specifies that remote script debugging is to be enabled. This option is ignored if
EnableDebugging is not specified.
|
AwaitDebuggerAndPauseOnStart | 8 |
Specifies that the script engine is to wait for a debugger connection and schedule a
pause before executing the first line of application script code. This option is
ignored if EnableDebugging is not specified.
|
EnableDateTimeConversion | 16 |
Specifies that the script engine is to perform automatic conversion between
.NET DateTime objects and JavaScript
Date
objects. This conversion is bidirectional and lossy. A DateTime object
constructed from a JavaScript Date object always represents a Coordinated
Universal Time (UTC) and has its Kind property set to
Utc.
|
EnableDynamicModuleImports | 32 |
Specifies that
dynamic module imports
are to be enabled. This is an experimental feature and may be removed in a future release.
|
MarshalUnsafeLongAsBigInt | 64 |
Specifies that long integers with values greater than
Number.MAX_SAFE_INTEGER
or less than
Number.MIN_SAFE_INTEGER
are to be marshaled as
BigInt.
This option is ignored if MarshalAllLongAsBigInt is specified.
|
MarshalAllLongAsBigInt | 128 |
Specifies that all long integers are to be marshaled as
BigInt.
|
EnableTaskPromiseConversion | 256 |
Specifies that the script engine is to perform automatic conversion between
.NET Task objects and JavaScript
promises.
This conversion is bidirectional and lossy. A Task object constructed from a
JavaScript promise always has a result type of Object.
|
EnableValueTaskPromiseConversion | 512 |
Specifies that the script engine is to perform automatic conversion from
.NET
ValueTask and
ValueTask<TResult>
structures to JavaScript
promises.
This conversion is unidirectional and lossy. This option is ignored if
EnableTaskPromiseConversion is not specified.
|
UseCaseInsensitiveMemberBinding | 1,024 |
Specifies that access to host object and class members is to be case-insensitive. This
option can introduce ambiguity if the host resource has distinct members whose names
differ only in case, so it should be used with caution.
|
EnableStringifyEnhancements | 2,048 |
Specifies that
JSON.stringify
enhancements are to be enabled. These enhancements add support for host objects via the
Json.NET library.
|
HideHostExceptions | 4,096 |
Specifies that host exceptions are to be hidden from script code. If an exception
thrown by the host reaches the script engine, it is caught automatically, and an
Error
object is thrown in its place. By default, ClearScript makes the managed exception
accessible to script code via the Error object's hostException property.
This option suppresses that behavior.
|
UseSynchronizationContexts | 8,192 |
Specifies that support for synchronization contexts is to be enabled for task-promise
interoperability. This option is ignored if
EnableTaskPromiseConversion is not specified.
|
AddPerformanceObject | 16,384 |
Specifies that the
Performance
object is to be added to the script engine's global namespace. This object provides a
set of low-level native facilities for performance-sensitive scripts.
|
SetTimerResolution | 32,768 |
Specifies that native timers are to be set to the highest available resolution while
the current V8ScriptEngine instance is active. This option is
ignored if AddPerformanceObject is not specified. It is only a
hint and may be ignored on some systems. On platforms that support it, this option can
degrade overall system performance or power efficiency, so caution is recommended.
|
See Also