I know it's a long shot, but can anyone think of a way to mimic this behavior in Google Apps Script? Namely - create a file on the client and fetch it up in a browser session.
Here's an example of the type of application I mean
You can use DocsListApp.createFile to create new HTML files on the user's Google Drive, but I don't believe you can serve the HTML from Drive directly. Alternatively you can use the SitesApp to create a new page on a Google Site with the HTML you want, using Site.addWebPage. Finally, you may want to look into the widgets available in UiApp or the UI Builder, to see if you can use those instead of custom HTML.
Just saw this:
HTML files uploaded to Public Google Drive folder are served as HTML, link is available through "Preview" button.
So far it doesn't work with Google Drive files simply moved to that folder but perhaps would work with files created there via createFile script.