Hi all,

I'm trying to get a widget to save its application-specific "view state" 
right before the desktop closes or refreshes (or any navigation event 
happens, really). I'd like to save this info to the preferences service. Is 
this possible? What's the best way to do it? I tried using the widget state 
API, but no event fired, which kind of makes sense since the widget's state 
wasn't really changing. I also tried trapping the onbeforeunload event, 
which is a bit more promising, but I'm concerned that it won't work over 
slow links if setUserPreference is asynchronous. I'm beginning to suspect 
that I have to save this state whenever it changes rather than trying to 
wait for an unload event. Any input is greatly appreciated. 

Reply via email to