Scary stuff. JS in JS... :-) I also gave the download issue some thought. Seems it would be possible to spoof a download in IE and Firefox (with privilege escalation warning). But not on Safari. And anyway, it would be an ugly and messy hack.
So my next thought would be to create something in Flash that could save a file locally. We can even supply it with the actual text file content from JS just like Bob explained. Is that doable? I don't have a license for that stuff and have never worked in Flash myself, so perhaps I'm just dead wrong here. Third option would be to just open a window with the packed text and ask the user to do Ctrl-S. Perhaps by setting the window title or something. Cheers, /Per On Mon, Oct 13, 2008 at 6:29 PM, Bob Ippolito <[EMAIL PROTECTED]> wrote: > I had intended to build exactly that years ago, but never got around > to it... mostly because it's hard to do client side and I didn't want > that feature to be dependent on some server-side script. > > My thinking was that we'd keep packed versions of every module (so > that we could continue to use the Java based packer, instead of > implementing a JavaScript version)[1] and some client-side could could > XHR them all down and concatenate them in the correct order, but the > problem is allowing the user to actually download that text. Using the > pasteboard would work I guess, but that's not a nice solution. > > I suppose we could set something up where the client just does a POST > to some URL (maybe an app engine service or something) and the server > simply echos it back with a Content-Disposition header that forces > download. > > [1] But maybe it would be reasonable to write an entirely JS based > packer with Narcissus > http://mxr.mozilla.org/mozilla/source/js/narcissus/ -- are there any > other projects like this that I'm not aware of? > > -bob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~----------~----~----~----~------~----~------~--~---
