Subj : Re: Serializing Object Graphs To : netscape.public.mozilla.jseng From : Eric Brueggemann Date : Wed Apr 09 2003 12:30 pm Brendan Eich wrote: > You're talking about messing with internals, not the public API. Before > I help, which I'm not sure I should do because of the hazards you'll > face tying your code into the engine that deeply, I'd still like to know > why you want all this fine-grained undo. What user benefit are you > providing, or currently problematic use-case are you addressing? > > /be > I'm building a server that executes client-side javascript and outputs a document that is free of any scripting. Despite the lack of javascript in the resultant document, the user must still be able to take actions that would have resulted in DOM events being triggered. So the user communicates this information with a new HTTP request. The response is a new script-free document that is a later "version" of the same original document. Now, if the user hits their back button and tries to interact with a previous version of the document, what they see on their display is inconsistent with the internal state of the original document stored on the server. The server must rollback its state before it executes the action desired by the user. Not doing so could result in unexpected behavior. Sending back an error or reloading the page from the start is not an acceptable solution. Cheers, Eric .