Good decision. But there are other ways to lose text, for example hitting Ctrl + R instead of Ctrl + T. I am not sure if web standards allow to restore text in this case.
I haven't looked, but according to the Chrome devs, because of the way the browser is built, saving the entire state of the DOM, JS, etc. is currently impossible.