[whatwg] salvaging work while navigating away from a web app -- onunload="confirm('save before quitting?')
ddailey
ddailey at zoominternet.net
Sun Nov 16 18:03:26 PST 2008
[Skip forward to paragraph four to avoid the historical backdrop. ]
1. Seven or eight years ago I was working on a mini-app [1] in the browser using VML. It allowed folks to build graphs on-screen with a GUI and then to do standard graph theoretic things: color nodes, find shortest paths, find dominating sets, copy and paste subgraphs, etc. I've been intermittently rebuilding parts of it using SVG instead of VML [2], but it's been gnarly work because of the ugly cross-browser development issues involving web apps. It makes sense to me that WHATWG came into existence to address some of the gnarly stuff like what I bumped into.
2. Over the years, I've watched with aggravated dismay, as well as curious bemusement, as pieces of its once robust (albeit single-browser -- given its use of VML) functionality have gradually been eroded by new releases of the IE browser, as that browser moves, toward what I presume is standards compliance. The app used to be able to read and write files to local drive space, to commandeer CTRL key sequences used by the browser and the OS, (for example CTRL T and CTRL D used to mean things in my app, but now the browser has taken those over as its own) and all manner of other things that a user expects of an application. If I were a company rather than a teacher/researcher, then I would have spent the necessary hours to modernize the code, perhaps. But it was not a product, but freeware and it was research that I was able to put on hold as my interests mutated.
3. But some of the research has (because of what might be called imperial entanglements) become relevant again, and so I find myself needing to provide some fixes to some of the now derelict parts, or better, to move the stuff to a more modern vector-based system like SVG.
4. Concerning the first thing I need to fix, I am not sure if HTML5 currently provides a solution for. Here's the sitch: because of an extensive use of CTRL sequences in the interface, the user will sometimes accidentally do something like CTRL R (which the browser thinks is a refresh command). In a regular app, if users stand in jeopardy of losing all their work, the app usually warns them before quitting. The way I found to work around it (that used to work) was to use onunload="confirm('save before quitting?'). Currently, however, IE seems to have removed my ability to intervene before it erases all work. onbeforeunload=function (){ fix(everything)} doesn't seem to help either.
So the question: how does HTML 5 currently address the issue and do browsers actually implement something along this line these days?
Thanks for guidance here, and sorry if the issue has already been satisfactorily resolved.
cheers
David
[1] http://srufaculty.sru.edu/david.dailey/grapher/ (IE only)
[2] http://srufaculty.sru.edu/david.dailey/svg/graphs18.svg (everthing but IE, or IE/ASV)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20081116/f2bbacf2/attachment.htm>
More information about the whatwg
mailing list