并不是说我对 Mozilla 的 Spidermonkey(将其用于核心 ASP.NET 应用程序内的自定义组件的类似 Rails 的迷你框架)不满意,但我仍然希望进一步探索这些选项。命令行解决方案不是我需要的,我不能依赖 CLR 以外的任何东西,我需要从 JavaScript/C# 对象调用方法。
// c# class
public class A
{
public string Hello(string msg)
{
return msg + " whatewer";
}
}
// js snippet
var a = new A();
console.log(a.Hello('Call me')); // i have a console.log implemented, don't worry, it's not a client-side code :)