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

New Post: Transfer object as JavaScript object

0
0
I changed the code to expose a Dictionary<string, object> on Engine.Script instead, and iterate over that and convert it to a real JS object. But that turned out to be more than twice as slow as Engine.Evaluate("someFunc(" + json + ")"). I'm guessing it's because I'm crossing the boundary between CLR and V8 a lot by doing that.

Is there any way to create a real JS object from C# and expose that to the script engine?

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images