These are chat archives for chrisber/v8dotnet/development-mono

6th
Feb 2015
Mikael Håkansson
@wmmihaa
Feb 06 2015 06:11 UTC
I'm now back at my project and can verify that it works. - Fantastic!
Should it work to execute methods on managed objects: EG:
class MainClass
{
    static V8Engine v8Engine;
    public static void Main (string[] args)
    {
        var script = @"console.log('this would freek me out');";
        var console = new Testconsole ();

        v8Engine = new V8Engine();
        v8Engine.GlobalObject.SetProperty("console", console, recursive: true);
        v8Engine.Execute (script);

        Console.ReadKey ();
    }
}
public class Testconsole
{
    public void log(string msg)
    {
        Console.WriteLine (msg);
    }
}
Come to think of it... I'll post it as a new thread instead...
Mikael Håkansson
@wmmihaa
Feb 06 2015 06:29 UTC
BTW... just realised that this is not working on widows either... sorry to bother you ;)