Skip to content
Taritsyn edited this page Mar 8, 2025 · 13 revisions

JavaScriptEngineSwitcher.Jurassic contains a JurassicJsEngine adapter (wrapper for the Jurassic version of February 4, 2025).

Engine settings

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

engineSwitcher.EngineFactories.AddJurassic(newJurassicSettings{StrictMode=true});

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

IJsEngineengine=newJurassicJsEngine(newJurassicSettings{StrictMode=true});

Consider in detail properties of the JurassicSettings class:

Property nameData typeDefault valueDescription
EnableIlAnalysisBooleanfalseFlag for whether to disassemble any generated IL and store it in the associated function.
EnableHostCollectionsEmbeddingByValueBooleanfalse

Flag for whether to enable conversion of host collections, that are passed or returned to script code, to script arrays.

This property does not allow the embedding of host collections by using a EmbedHostObject method, it only affects the internal mechanisms of the Jurassic library.

StrictModeBooleanfalseFlag for whether to allow run the script in strict mode.

Known issues

Errors when accessing to the constants of embedded types.

Clone this wiki locally