ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript.V8
V8CacheKind Enumeration
V8CacheResult Enumeration
V8CpuProfile Class
V8CpuProfile.Node Class
V8CpuProfile.Node.HitLine Structure
V8CpuProfile.Sample Class
V8CpuProfileFlags Enumeration
V8GlobalFlags Enumeration
V8Runtime Class
V8RuntimeConstraints Class
V8RuntimeDebuggerEventArgs Class
V8RuntimeFlags Enumeration
V8RuntimeHeapInfo Class
V8RuntimeViolationPolicy Enumeration
V8Script Class
V8ScriptEngine Class
V8ScriptEngineFlags Enumeration
V8Settings Class

# V8ScriptEngineFlags Enumeration

Defines options for initializing a new V8 JavaScript engine instance.
Namespace: Microsoft.ClearScript.V8
Assembly: ClearScript.V8 (in ClearScript.V8.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    [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.
MarshalUnsafeInt64AsBigInt | 64 | Specifies that 64-bit 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 MarshalAllInt64AsBigInt is specified.
MarshalUnsafeLongAsBigInt | 64 | Obsolete. Equivalent to MarshalUnsafeInt64AsBigInt.
MarshalAllInt64AsBigInt | 128 | Specifies that all 64-bit integers are to be marshaled as BigInt.
MarshalAllLongAsBigInt | 128 | Obsolete. Equivalent to MarshalAllInt64AsBigInt.
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.
EnableArrayConversion | 65,536 | Specifies that the script engine is to perform automatic conversion between .NET and JavaScript arrays. This conversion is bidirectional and lossy. A .NET array constructed from a JavaScript array always has an element type of Object, making it impossible for script code to specify a strongly typed array as a .NET method argument or property value. Excessive copying of array contents can also impact application performance and/or memory consumption. Caution is recommended.

See Also

#### Reference

Microsoft.ClearScript.V8 Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft