- Notifications
You must be signed in to change notification settings - Fork 49
MSIE
JavaScriptEngineSwitcher.Msie contains a MsieJsEngine adapter (wrapper for the MSIE JavaScript Engine for .NET).
For correct working of the MSIE JavaScript Engine it is recommended to install Internet Explorer 9+ or Microsoft Edge Legacy on the machine.
You can specify a settings of JS engine during its registration:
engineSwitcher.EngineFactories.AddMsie(newMsieSettings{EngineMode=JsEngineMode.ChakraIeJsRt});If you manually create an instance of JS engine, then you can pass settings via the constructor:
IJsEngineengine=newMsieJsEngine(newMsieSettings{EngineMode=JsEngineMode.ChakraIeJsRt});Consider in detail properties of the MsieSettings class:
| Property name | Data type | Default value | Description |
|---|---|---|---|
AllowReflection | Boolean | false | Flag for whether to allow the usage of reflection API in the script code. This affects |
EnableDebugging | Boolean | false | Flag for whether to allow debugging in Visual Studio by adding the debugger statement to script code. |
EngineMode | JsEngineMode enumeration | Auto | JS engine mode. Can take the following values:
|
MaxStackSize | Int32 | 503 808 or 1 007 616 | Maximum stack size in bytes. Set a Not supported in version for .NET Core 1.X. |
UseEcmaScript5Polyfill | Boolean | false | Flag for whether to use the ECMAScript 5 Polyfill. |
UseJson2Library | Boolean | false | Flag for whether to use the JSON2 library |
MSIE JavaScript Engine for .NET has support of the debugging in Visual Studio 2010-2012.
In addition, debuggable script must contain a debugger statement (see MSDN for more details).
Here are steps, that you need to do for start of debugging:
Switch the solution in debug mode.
Set the
EnableDebuggingproperty of theMsieSettingsclass totrue.Add the
debuggerstatements in debuggable script code.Click on the Start button.
In opened the Visual Studio Just-In-Time Debugger window select the New instance of Microsoft Visual Studio 2012 item:
In the Visual Studio debugger window open the script block(s) and set breakpoint(s):
Return to the main Visual Studio window and click on the Continue button.


