Skip to content
Taritsyn edited this page May 11, 2026 · 37 revisions

JavaScriptEngineSwitcher.NiL contains a NiLJsEngine adapter (wrapper for the NiL.JS version 2.6.1722).

Engine settings

You can specify a settings of JS engine during its registration:

engineSwitcher.EngineFactories.AddNiL(newNiLSettings{StrictMode=true});

If you manually create an instance of JS engine, then you can pass settings via the constructor:

IJsEngineengine=newNiLJsEngine(newNiLSettings{StrictMode=true});

Consider in detail properties of the NiLSettings class:

Property nameData typeDefault valueDescription
DebuggerCallbackNiL.JS.Core.DebuggerCallback delegatenullDebugger callback.
EnableDebuggingBooleanfalseFlag for whether to enable script debugging features.
LocalTimeZoneTimeZoneInfoTimeZoneInfo.LocalLocal time zone for the Date objects in the script.
StrictModeBooleanfalseFlag for whether to allow run the script in strict mode.

Clone this wiki locally