MSIE
JavaScriptEngineSwitcher.Msie contains adapter MsieJsEngine (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.
Engine settings
You can specify a settings of JS engine during its registration:
engineSwitcher.EngineFactories
.AddMsie(new MsieSettings
{
EngineMode = JsEngineMode.ChakraIeJsRt
})
;If you manually create an instance of JS engine, then you can pass settings via the constructor:
IJsEngine engine = new MsieJsEngine(
new MsieSettings
{
EngineMode = JsEngineMode.ChakraIeJsRt
}
);Consider in detail properties of the MsieSettings class:
| Property name | Data type | Default value | Description |
|---|---|---|---|
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 |
Debugging
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.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.



