-
Notifications
You must be signed in to change notification settings - Fork 49
Jint
dron edited this page Oct 15, 2018
·
48 revisions
JavaScriptEngineSwitcher.Jint contains adapter JintJsEngine
(wrapper for the Jint version 2.11.58).
You can specify a settings of JS engine during its registration:
engineSwitcher.EngineFactories
.AddJint(new JintSettings
{
StrictMode = true
})
;
If you manually create an instance of JS engine, then you can pass settings via the constructor:
IJsEngine engine = new JintJsEngine(
new JintSettings
{
StrictMode = true
}
);
Consider in detail properties of the JintSettings
class:
Property name | Data type | Default value | Description |
---|---|---|---|
AllowDebuggerStatement |
Boolean |
false |
Flag for whether to allow the debugger statement to be called in a script. |
EnableDebugging |
Boolean |
false |
Flag for whether to enable debug mode. |
LocalTimeZone |
TimeZoneInfo |
TimeZoneInfo.Local |
Local time zone for the Date objects in the script. |
MaxRecursionDepth |
Int32 |
-1 |
Maximum allowed depth of recursion:
|
MaxStatements |
Int32 |
0 |
Maximum number of statements. |
StrictMode |
Boolean |
false |
Flag for whether to allow run the script in strict mode. |
Timeout |
Int32 |
0 |
Number of milliseconds to wait before the script execution times out. |
- Registration of JS engines
- Creating instances of JS engines
- JS engines
- Upgrade guides
- Additional reading and resources