Click or drag to resize

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.4.5
Syntax
[FlagsAttribute]
public enum V8ScriptEngineFlags
Members
Member nameValueDescription
None0 Specifies that no options are selected.
EnableDebugging1 Specifies that script debugging features are to be enabled.
DisableGlobalMembers2 Specifies that support for GlobalMembers behavior is to be disabled. This option yields a significant performance benefit for global item access.
EnableRemoteDebugging4 Specifies that remote script debugging is to be enabled. This option is ignored if EnableDebugging is not specified.
AwaitDebuggerAndPauseOnStart8 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.
EnableDateTimeConversion16 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.
EnableDynamicModuleImports32 Specifies that dynamic module imports are to be enabled. This is an experimental feature and may be removed in a future release.
MarshalUnsafeLongAsBigInt64 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.
MarshalAllLongAsBigInt128 Specifies that all long integers are to be marshaled as BigInt.
EnableTaskPromiseConversion256 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.
EnableValueTaskPromiseConversion512 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.
UseCaseInsensitiveMemberBinding1,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.
EnableStringifyEnhancements2,048 Specifies that JSON.stringify enhancements are to be enabled. These enhancements add support for host objects via the Json.NET library.
HideHostExceptions4,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.
UseSynchronizationContexts8,192 Specifies that support for synchronization contexts is to be enabled for task-promise interoperability. This option is ignored if EnableTaskPromiseConversion is not specified.
AddPerformanceObject16,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.
SetTimerResolution32,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