Is there a way to dynamically interpret a string as javascript within a C# winforms program?

This page summarizes the projects mentioned and recommended in the original post on /r/csharp

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Jint

    Javascript Interpreter for .NET

    Jint https://github.com/sebastienros/jint

  • ClearScript

    A library for adding scripting to .NET applications. Supports V8 (Windows, Linux, macOS) and JScript/VBScript (Windows).

    I've used ClearScript before to use JavaScript as a DSL in a tool. No issues at all. https://github.com/microsoft/ClearScript

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • CefSharp

    .NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework

    I dont want to state the obvious but of course there is CefSharp .. But of course thats pretty heavy duty as you end shipping a headless version of Chrome in your app, but it can do anything a browser can do (of course it can, its Chrome), including exectuting a JavaScript string on the fly and getting a response. Because its Chrome you evenn have access the the dev tool and everything like that. But the other suggestions might be better suited as they might be more lightweight.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts