Run all page lifecycle events from script

I have an html page stored in a string. I want to replace the entire html of the displayed page with html in my line, and then fire all the page life cycle events like document.ready, window.load, etc.

Although I talked about using the file system API - I wrote html on the file system, and then redirected to it. Not sure if it is workable, and this is definitely a bust.
Is there an easier and clearer way to get the same result?

Thank.

+5
source share
1 answer

What about

$('html').html(new_html_body);
+1
source

All Articles