I'm using the noesis javascript.net library in my C# MVC3 application.
Is it possible to save a snapshot of a javascript context object and then reload that snapshot into a new javascript context instance?
Not sure if the original user will find this useful but I achieved this by adding a object to my context that let me write to disk (simple wrapper around TextWriter), then serialized this
where this
was the global scope so it captured all objects.
The obvious pitfall is that not all objects are serialized proper (I used JSON.stringify
for serialization).
When I need to reload the context I loaded up the string from the file into a variable in my context and set the objects back.