We are trying to use Jurassic to run our unit tests as part of our build process.
We would like to be able to support some browser functionality like window.setTimeout as objects in our space.
Our current code likes something like this:
public int setTimeout(ObjectInstance callback, int millisec, string lang = null)
Timer timer = new Timer(obj => this.Engine.CallGlobalFunction(callback), callback, millisec, Timeout.Infinite);
Only problem is that the callback which is passed in comes in as a string which is the serialized form of the entire function.
Is there a recommended way of accomplishing this?