Jurassic is an implementation of the ECMAScript language and runtime. It aims to provide the best performing and most standards-compliant implementation of JavaScript for .NET. Jurassic is not intended for end-users; instead it is intended to be integrated into .NET programs. If you are the author of a .NET program, you can use Jurassic to compile and execute JavaScript code.
Questions tagged [jurassic]
19 questions
9
votes
1 answer
Load a DOM and Execute javascript, server side, with .Net
I would like to load a DOM using a document (in string form) or a URL, and then Execute javascript functions (including jquery selectors) against it. This would be totally server side, in process, no client/browser.
Basically I need to load the dom…

Brook
- 5,949
- 3
- 31
- 45
4
votes
0 answers
How to integrate JavaScript Compiler (like Jurassic, ClearScript) into Visual Studio 2010 shell
I have a project in which I have to support javascript debugging from Jurassic or ClearScript or any other open source java script compiler for .net into to the Visual Studio 2010 Isolated shell. My requirement is that I can use F5, F10 and put a…

waqaar
- 41
- 2
3
votes
2 answers
Using Jurassic to precompile a JsRender template server-side
I'm attempting to precompile JsRender templates from a class library written in C#, using the Jurassic script engine to execute JsRender.
Here is my code:
var engine = new Jurassic.ScriptEngine();
engine.Execute(JsRenderContents);
var…

awj
- 7,482
- 10
- 66
- 120
2
votes
2 answers
Getting JS error location when using Jurassic
I'm using the Jurassic JS engine to run some JS code in a .NET application. Unfortunately I get an exception when running the code which is caused by some undefined value somewhere. But how can I locate the exact spot? Note that I cannot run it in a…

Lucero
- 59,176
- 9
- 122
- 152
1
vote
0 answers
C# create typed object from anonymous json
In my code I make a web request and receive back html, I use Jurassic Engine to map that data to a stringified JSON object.
var engine = new Jurassic.ScriptEngine();
var result = engine.Evaluate("(function() { " + output + " return someVariable;…

Edon
- 1,116
- 2
- 22
- 47
1
vote
1 answer
Is it possible to expose a .NET object to JavaScript which has a method returning an IEnumerable?
I'm trying to create a .NET class that will be exposed to JavaScript via the Jurassic JavaScript engine. The class represents an HTTP response object. Since an HTTP response may have multiple headers with the same name, I would like to include a…

Simon Elms
- 17,832
- 21
- 87
- 103
1
vote
0 answers
Could not load type 'System.Runtime.Serialization.ISerializable'
I'm getting this error when I try to use Jurassic.ScriptEngine in my WinPhone 8.1 Project.
The entire error message:
Could not load type 'System.Runtime.Serialization.ISerializable' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral,…

Reynevan
- 1,475
- 1
- 18
- 35
1
vote
1 answer
Execute function with complex parameters
For a not relevant reason for this question, i need to call a javascript function, defined inside a js file, from a .net desktop application and get the result.
I'm using Jurassic to do this. However i don't know how to call functions which recieve…

Rumpelstinsk
- 3,107
- 3
- 30
- 57
1
vote
1 answer
How to run Jurassic (js engine) on wp7 and wp8
I've tried to install jurassic on my project using nuget, well, on windows 8 no problems it works, but neither in windows phone 7 and windows phone 8 won't compile...
any Ideas, I know (from comment on site) that on wp7 and wp8 can works but I…

LXG
- 1,957
- 3
- 22
- 45
1
vote
1 answer
Possible to Yield/Sleep/throttle another thread while it is executing a method in an external library - specifically Jurassic?
I am using a .Net JavaScript implementation called Jurassic to run user-controlled scripts within my .Net 4 WPF application coded in VB.Net - C# answers are fine. The script engine runs on its own thread and provides an API for the script to…

SeriousSamP
- 436
- 3
- 18
0
votes
0 answers
Create chart on canvas in JINT in c#
Thanks in advance..
I am creating a pdf from html using iText7 and in that html I am creating a chart on canvas with chart.js. All these are in memory in c# service where I can not use Chrome or any browser library with selenium.
I want to generate…

Sachin
- 2,152
- 1
- 21
- 43
0
votes
1 answer
Failed API Call - How to handle "Error 400" for Jurassic API?
When setting up the API call for Jurassic (requested from https://studio.ai21.com/docs/api/), I always get the 400 error response.
import json
import requests
requests.post(
"https://api.ai21.com/studio/v1/j1-large/complete",
…

marius89
- 3
- 1
0
votes
1 answer
evaluate with jurassic js code, which modify html
I'm trying to reimplement getting captcha inside c# application. Having problem, because of no experience in JS.
GET-request returns data, which contains captcha src tag, empty by default.
...

Sash0k
- 750
- 2
- 10
- 24
0
votes
1 answer
In Jurassic, how do I limit script running time?
I am implementing Jurassic script engine, how do I limit how long a script will take?
string ExcutingFunction = " for(var i=0;i<1000000;i++){ i%2; } ";
ScriptEngine ScrptingEngine = new ScriptEngine();
…

Bill Software Engineer
- 7,362
- 23
- 91
- 174
0
votes
1 answer
ASP.NET Web API returning C# class
In Web API Controller action method returns C# class, like that:
public class ShipController : ApiController
{
[HttpGet]
public Cell GetShip()
{
return new Cell(new ScriptEngine());
}
}
Where Cell is my class, inherited from…

Glavak
- 23
- 5