Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: How to get the console.log("let's log something") messages after executing the js file?

$
0
0
Hello!

At first, thank you for your work, ClearScript is awesome.

My question is: how to get the console.log("") messages after executing the js file? I created a host object and basically substituted the console object.
engine.AddHostObject("console", new ClearScriptLogger());
class ClearScriptLogger
{
     public void log(String message)
     {
        debug(message);        
     }

     public void debug(String message)
     {
         Debug.WriteLine(message);
     }
}
But this solution is kind of a hack. Any other solutions?

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images