{"id":19228147,"url":"https://github.com/taritsyn/msiejavascriptengine","last_synced_at":"2025-10-12T15:43:38.723Z","repository":{"id":4421489,"uuid":"5559276","full_name":"Taritsyn/MsieJavaScriptEngine","owner":"Taritsyn","description":".NET wrapper for working with the JavaScript engines of Internet Explorer and Edge Legacy.","archived":false,"fork":false,"pushed_at":"2024-03-01T16:45:28.000Z","size":5509,"stargazers_count":107,"open_issues_count":1,"forks_count":22,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-10-02T03:23:54.597Z","etag":null,"topics":["activescript","chakra","dotnet","ecmascript","edge","javascript","javascript-engine","jsrt","msie"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Taritsyn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-08-26T10:43:27.000Z","updated_at":"2025-09-23T03:19:44.000Z","dependencies_parsed_at":"2024-01-08T16:30:49.254Z","dependency_job_id":"f018f596-39f3-43f5-b1e5-307c50e64f6b","html_url":"https://github.com/Taritsyn/MsieJavaScriptEngine","commit_stats":{"total_commits":249,"total_committers":2,"mean_commits":124.5,"dds":0.004016064257028162,"last_synced_commit":"ab17463dc27702bdd02bf7b50b54c6bd5612d7bc"},"previous_names":[],"tags_count":77,"template":false,"template_full_name":null,"purl":"pkg:github/Taritsyn/MsieJavaScriptEngine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Taritsyn%2FMsieJavaScriptEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Taritsyn%2FMsieJavaScriptEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Taritsyn%2FMsieJavaScriptEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Taritsyn%2FMsieJavaScriptEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Taritsyn","download_url":"https://codeload.github.com/Taritsyn/MsieJavaScriptEngine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Taritsyn%2FMsieJavaScriptEngine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011856,"owners_count":26085005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activescript","chakra","dotnet","ecmascript","edge","javascript","javascript-engine","jsrt","msie"],"created_at":"2024-11-09T15:26:54.095Z","updated_at":"2025-10-12T15:43:38.684Z","avatar_url":"https://github.com/Taritsyn.png","language":"C#","readme":"MSIE JavaScript Engine for .NET [![NuGet version](http://img.shields.io/nuget/v/MsieJavaScriptEngine.svg)](https://www.nuget.org/packages/MsieJavaScriptEngine/)  [![Download count](https://img.shields.io/nuget/dt/MsieJavaScriptEngine.svg)](https://www.nuget.org/packages/MsieJavaScriptEngine/)\n===============================\n\n![MSIE JS Engine Logo](http://i.imgur.com/T3K5q.png)\n\nThis 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). \nProject was based on the code of [SassAndCoffee.JavaScript](https://github.com/anaisbetts/SassAndCoffee), [Chakra Sample Hosts](https://github.com/panopticoncentral/chakra-host) and [jsrt-dotnet](https://github.com/robpaveza/jsrt-dotnet).\n\nMSIE 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 \u003ccode title=\"MsieJavaScriptEngine.JsEngineMode\"\u003eJsEngineMode\u003c/code\u003e enumeration:\n\n * `Auto`. Automatically selects the most modern JavaScript engine from available on the machine.\n * `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.**\n * `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.**\n * `ChakraIeJsRt`. “IE” JsRT version of Chakra JavaScript engine (supports ECMAScript 5). Requires Internet Explorer 11 or Microsoft Edge Legacy on the machine.\n * `ChakraEdgeJsRt`. “Edge” JsRT version of Chakra JavaScript engine (supports ECMAScript 5). Requires Microsoft Edge Legacy on the machine.\n\nThe supported .NET types are as follows:\n\n * `MsieJavaScriptEngine.Undefined`\n * `System.Boolean`\n * `System.Int32`\n * `System.Double`\n * `System.String`\n\n## Installation\nThis library can be installed through NuGet - [https://www.nuget.org/packages/MsieJavaScriptEngine](https://www.nuget.org/packages/MsieJavaScriptEngine).\n\n## Usage\nConsider a simple example of usage of the MSIE JavaScript Engine:\n\n```csharp\nusing System;\n\nusing MsieJavaScriptEngine;\nusing MsieJavaScriptEngine.Helpers;\n\nnamespace MsieJavaScriptEngine.Example.Console\n{\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            try\n            {\n                using (var jsEngine = new MsieJsEngine())\n                {\n                    const string expression = \"7 * 8 - 20\";\n                    var result = jsEngine.Evaluate\u003cint\u003e(expression);\n\n                    Console.WriteLine(\"{0} = {1}\", expression, result);\n                }\n            }\n            catch (JsEngineLoadException e)\n            {\n                Console.WriteLine(\"During loading of JavaScript engine an error occurred.\");\n                Console.WriteLine();\n                Console.WriteLine(JsErrorHelpers.GenerateErrorDetails(e));\n            }\n            catch (JsScriptException e)\n            {\n                Console.WriteLine(\"During processing of JavaScript code an error occurred.\");\n                Console.WriteLine();\n                Console.WriteLine(JsErrorHelpers.GenerateErrorDetails(e));\n            }\n            catch (JsException e)\n            {\n                Console.WriteLine(\"During working of JavaScript engine an unknown error occurred.\");\n                Console.WriteLine();\n                Console.WriteLine(JsErrorHelpers.GenerateErrorDetails(e));\n            }\n\n            Console.ReadLine();\n        }\n    }\n}\n```\n\nFirst we create an instance of the \u003ccode title=\"MsieJavaScriptEngine.MsieJsEngine\"\u003eMsieJsEngine\u003c/code\u003e class.\nThen we evaluate a JavaScript expression by using of the `Evaluate` method and output its result to the console.\nIn addition, we provide handling of the following exception types: \u003ccode title=\"MsieJavaScriptEngine.JsEngineLoadException\"\u003eJsEngineLoadException\u003c/code\u003e, \u003ccode title=\"MsieJavaScriptEngine.JsScriptException\"\u003eJsScriptException\u003c/code\u003e and \u003ccode title=\"MsieJavaScriptEngine.JsException\"\u003eJsException\u003c/code\u003e.\nIn the MSIE JavaScript Engine, exceptions have the following hierarchy:\n\n  * \u003ccode title=\"MsieJavaScriptEngine.JsException\"\u003eJsException\u003c/code\u003e\n    * \u003ccode title=\"MsieJavaScriptEngine.JsEngineException\"\u003eJsEngineException\u003c/code\u003e\n      * \u003ccode title=\"MsieJavaScriptEngine.JsEngineLoadException\"\u003eJsEngineLoadException\u003c/code\u003e\n    * \u003ccode title=\"MsieJavaScriptEngine.JsFatalException\"\u003eJsFatalException\u003c/code\u003e\n    * \u003ccode title=\"MsieJavaScriptEngine.JsScriptException\"\u003eJsScriptException\u003c/code\u003e\n      * \u003ccode title=\"MsieJavaScriptEngine.JsCompilationException\"\u003eJsCompilationException\u003c/code\u003e\n      * \u003ccode title=\"MsieJavaScriptEngine.JsRuntimeException\"\u003eJsRuntimeException\u003c/code\u003e\n         * \u003ccode title=\"MsieJavaScriptEngine.JsInterruptedException\"\u003eJsInterruptedException\u003c/code\u003e\n    * \u003ccode title=\"MsieJavaScriptEngine.JsUsageException\"\u003eJsUsageException\u003c/code\u003e\n\nAlso, when you create an instance of the \u003ccode title=\"MsieJavaScriptEngine.MsieJsEngine\"\u003eMsieJsEngine\u003c/code\u003e class, then you can pass the JavaScript engine settings via the constructor.\nConsider in detail properties of the \u003ccode title=\"MsieJavaScriptEngine.JsEngineSettings\"\u003eJsEngineSettings\u003c/code\u003e class:\n\n\u003ctable border=\"1\" style=\"font-size: 0.7em\"\u003e\n    \u003cthead\u003e\n        \u003ctr valign=\"top\"\u003e\n            \u003cth\u003eProperty name\u003c/th\u003e\n            \u003cth\u003eData\u0026nbsp;type\u003c/th\u003e\n            \u003cth\u003eDefault value\u003c/th\u003e\n            \u003cth\u003eDescription\u003c/th\u003e\n        \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr valign=\"top\"\u003e\n            \u003ctd\u003e\u003ccode\u003eAllowReflection\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003ccode title=\"System.Boolean\"\u003eBoolean\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003efalse\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\n                \u003cp\u003eFlag for whether to allow the usage of reflection API in the script code.\u003c/p\u003e\n                \u003cp\u003eThis affects \u003ccode\u003eObject.GetType\u003c/code\u003e, \u003ccode\u003eException.GetType\u003c/code\u003e, \u003ccode\u003eException.TargetSite\u003c/code\u003e and \u003ccode\u003eDelegate.Method\u003c/code\u003e.\u003c/p\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr valign=\"top\"\u003e\n            \u003ctd\u003e\u003ccode\u003eEnableDebugging\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003ccode title=\"System.Boolean\"\u003eBoolean\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003efalse\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003eFlag for whether to allow debugging in Visual Studio by adding the \u003ccode\u003edebugger\u003c/code\u003e statement to script code.\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr valign=\"top\"\u003e\n            \u003ctd\u003e\u003ccode\u003eEngineMode\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003ccode title=\"MsieJavaScriptEngine.JsEngineMode\"\u003eJsEngineMode\u003c/code\u003e enumeration\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003eAuto\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003eJavaScript engine mode.\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr valign=\"top\"\u003e\n            \u003ctd\u003e\u003ccode\u003eMaxStackSize\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003ccode title=\"System.Int32\"\u003eInt32\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003e503 808\u003c/code\u003e or \u003ccode\u003e1 007 616\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\n                \u003cp\u003eMaximum stack size in bytes.\u003c/p\u003e\n                \u003cp\u003eSet a \u003ccode\u003e0\u003c/code\u003e to use the default maximum stack size specified in the header for the executable.\u003c/p\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr valign=\"top\"\u003e\n            \u003ctd\u003e\u003ccode\u003eUseEcmaScript5Polyfill\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003ccode title=\"System.Boolean\"\u003eBoolean\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003efalse\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003eFlag for whether to use the ECMAScript 5 Polyfill.\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr valign=\"top\"\u003e\n            \u003ctd\u003e\u003ccode\u003eUseJson2Library\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003ccode title=\"System.Boolean\"\u003eBoolean\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003efalse\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003eFlag for whether to use the \u003ca href=\"https://github.com/douglascrockford/JSON-js\"\u003eJSON2\u003c/a\u003e library\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\n\n## Release History\nSee the [changelog](CHANGELOG.md).\n\n## License\n[Apache License Version 2.0](LICENSE.md)\n\n## Credits\n * [SassAndCoffee.JavaScript](https://github.com/anaisbetts/SassAndCoffee) - [License: Microsoft Public License (Ms-PL)](https://github.com/anaisbetts/SassAndCoffee/blob/master/COPYING) Part of the code of this library served as the basis for the ActiveScript version of Chakra and Classic JavaScript Engine.\n * [Chakra Sample Hosts](https://github.com/panopticoncentral/chakra-host) - [License: Apache License 2.0 (Apache)](https://github.com/panopticoncentral/chakra-host/blob/master/LICENSE) C# example from this project served as the basis for the JsRT versions of Chakra.\n * [jsrt-dotnet](https://github.com/robpaveza/jsrt-dotnet) - [License: The MIT License (MIT)](https://github.com/robpaveza/jsrt-dotnet/blob/master/LICENSE) Part of the code of this library is used in the JsRT versions of Chakra.\n * [ECMAScript 5 Polyfill](https://www.nuget.org/packages/ES5) and [MDN JavaScript Polyfills](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference) - Adds support for many of the new functions in ECMAScript 5 to downlevel browsers.\n * [Cross-Browser Split](https://blog.stevenlevithan.com/archives/cross-browser-split) - Adds ECMAScript compliant and uniform cross-browser split method.\n * [JSON2 library](https://github.com/douglascrockford/JSON-js) - Adds support of the JSON object from ECMAScript 5 to downlevel browsers.\n * [UglifyJS](https://github.com/mishoo/UglifyJS) - [License: BSD License (BSD)](https://github.com/mishoo/UglifyJS/blob/master/LICENSE) JS-files, that used MSIE JS Engine, minificated by using this tool.\n\n## Who's Using MSIE JavaScript Engine\nIf you use the MSIE JavaScript Engine in some project, please send me a message so I can include it in this list:\n\n * [BitAdminCore.ALL](https://www.nuget.org/packages/BitAdminCore.ALL)\n * [Chevron](https://github.com/simoncropparchived/Chevron) by Simon Cropp\n * [JavaScript Engine Switcher](https://github.com/Taritsyn/JavaScriptEngineSwitcher) by Andrey Taritsyn\n * [PowerShell.JS](https://github.com/klumsy/powershellJS) by Karl Prosser\n * [SquishIt](https://github.com/jetheredge/SquishIt) by Justin Etheredge and Alex Ullrich\n * [Strike](https://github.com/simoncropparchived/Strike) by Simon Cropp","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaritsyn%2Fmsiejavascriptengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaritsyn%2Fmsiejavascriptengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaritsyn%2Fmsiejavascriptengine/lists"}