How do I save a file generated by an OS X Dashboard Widget?
- by Weston C
I've got a web app that I'm porting to an OS X Dashboard widget. The web app generates some data on the client side using JavaScript, and then, when the user wants to save it, sends it to a server-side script which relays the data back with the Content-disposition: attachment; HTTP header, triggering a save-file dialog in most browsers.
I've tried duplicating this in the Dashboard environment. The Widget simply disappears. I don't know, but I suspect that it may be actually navigating to the unfamiliar content.
So, how do I trigger a "save file dialog" -- or, failing that, use any method at all to save the data the Widget generates as a file?