Skip to content

About

.NET wrapper for working with the JavaScript engines of Internet Explorer and Edge Legacy.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

MSIE JavaScript Engine for .NET NuGet version Download count

MSIE JS Engine Logo

This project is a .NET wrapper for working with the JavaScript engines of Internet Explorer and Edge Legacy (JsRT versions of Chakra, ActiveScript version of Chakra and Classic JavaScript Engine). Project was based on the code of SassAndCoffee.JavaScript, Chakra Sample Hosts and jsrt-dotnet.

MSIE JavaScript Engine requires a installation of Internet Explorer or Edge Legacy on the machine and can work in 5 modes, that are defined in the JsEngineMode enumeration:

  • Auto. Automatically selects the most modern JavaScript engine from available on the machine.
  • Classic. Classic MSIE JavaScript engine (supports ECMAScript 3 with possibility of using the ECMAScript 5 Polyfill and the JSON2 library). Requires Internet Explorer 6 or higher on the machine. Not supported in version for .NET Core.
  • ChakraActiveScript. ActiveScript version of Chakra JavaScript engine (supports ECMAScript 5). Requires Internet Explorer 9 or higher on the machine. Not supported in version for .NET Core.
  • ChakraIeJsRt. “IE” JsRT version of Chakra JavaScript engine (supports ECMAScript 5). Requires Internet Explorer 11 or Microsoft Edge Legacy on the machine.
  • ChakraEdgeJsRt. “Edge” JsRT version of Chakra JavaScript engine (supports ECMAScript 5). Requires Microsoft Edge Legacy on the machine.

The supported .NET types are as follows:

  • MsieJavaScriptEngine.Undefined
  • System.Boolean
  • System.Int32
  • System.Double
  • System.String

Installation

This library can be installed through NuGet - https://www.nuget.org/packages/MsieJavaScriptEngine.

Usage

Consider a simple example of usage of the MSIE JavaScript Engine:

using System;

using MsieJavaScriptEngine;
using MsieJavaScriptEngine.Helpers;

namespace MsieJavaScriptEngine.Example.Console
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                using (var