On May 25, 10:16 am, [email protected] wrote:
> This is mostly for Eric:
>
> This tiddlywiki commit
>
>    https://github.com/TiddlyWiki/tiddlywiki/commit/89ef40fe82973a0aae173...
>
> implies that the new HTML5 download handling could allow saving the
> content of any tiddlywiki being viewed in the browser to disk, even if
> the tiddlywiki is currently considered to be "online".
>
> This could be relevant/interesting to how TiddlySpace handles
> tiddlywikis. Is there any more info about this that you can point me
> at. Or can you give a "here's how it works, this is what it means,
> this is why it matters" kind of summary?

You are correct.  The window.allowSave() function was changed so that,
instead of only returning true if viewing a file:// URL, it now
returns true all the time.  This allows the saveChanges() handling to
proceed even if viewing a file via http://, instead of displaying a
notFileUrlError message ("You need to save this TiddlyWiki to a file
before you can save changes").

saveChanges() calls on saveMain() which, in turn, calls on
fileSave().  fileSave() uses a 'fallack cascade' to attempt to save
the file using various forms of browser-specific *local file I/O* (moz/
TiddlyFox, webkit/TiddlySaver, IE/ActiveX).  In previous releases, if
these methods fail, the "save changes" fails as well.  However, in
TW280, rather than failing, fileSave() calls on
HTML5DownloadFileSave() to construct a link element ("A") with the
file contents encoded as an href="data://..." URI and then
automatically clicks the link to initiate a "download" of the data://
URI as an alternative method of saving the file via the browser's
standard download dialogs.

If you go to http://www.TiddlyWiki.com/beta and choose "save changes",
it will no longer fail... instead, you are prompted to save the file
locally... and this will include any tiddler changes you made online!

-e

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to