html - Serializing the complete Javascript state of a website including Closure/Hidden scopies? -


i save "snapshot" of webpage should remain in "interactive" state -> javascript state has saved , restored.

example showing issue i'm trying solve: given webpage executes following script in global scope:

function f(x) { return function() { return x; } } var g = f(2); 

i'd save both function f (more or less trivial) , variable g (which closes on x f invocation) file , restore state of website later.

as far figure out seems impossible using "web" technologies (ie. permissions webpage has). i'm therefore guessing i'll have implement browser addon achieve this.

does exist? starting point? noticed firefox session restore similar, know if reuse mechanism? if not feasible implement "debugger" style addon? there simpler solutions?

javascript objects hold onto dom/other native objects. native objects have hidden state , can entangled global browser state or addons.

so real way can think of run browser in vm , snapshot/clone vm.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -