Did not the unsaved changes open a dialogue warning you are about to navigate away with unsaved changes.
The reason I don't think you will get what you ask for is browsers do not want to allow websites altering the way they operate. This is usually called malware.
I suggest look closer at tiddlywiki and why it did not stop you loosing changes.
Did you alter the save mechanisium, what save method was in use I assume the tiddlyspot one?
regards
Tony
Tony, I don't think the browser asked me that I had unsaved changes. But this was about 3 months ago.
I did not alter any save mechanism. I think I had it autosave every time I closed the edit box when I was done editing.