Hi J
If I understand correctly from our earlier Twitter conversation [1], you're writing a container app for TiddlyWiki, along the lines of TiddlyDesktop but written to use Microsoft's UWP APIs for Windows 10.
If so, you may be able to avoid writing a new saver by instead implementing the protocol used by the "tiddlyfox" saver [2], which is used by TiddlyDesktop and several other adaptors.
The tiddlyfox protocol is DOM-based because typically container apps don't have access to the JavaScript environment of the hosted TiddlyWiki page. The protocol goes like this:
First the setup:
1. The container app instantiates a webview and loads the TiddlyWiki file
2. Once the page has completed loading (the webview usually provides an event for this), the container app must insert into the DOM a new DIV as a child of the body with the ID "tiddlyfox-message-box"
3. The container app must also register a custom event handler on the message box DIV for the message "tiddlyfox-save-file"
Then, to handle a save operation triggered from within the wiki:
4. TW creates a new DIV as a child of the message box DIV that we call the message DIV. It must have the following attributes:
* data-tiddlyfox-path: the local pathname to the file
* data-tiddlyfox-content: the content to be saved to the file
5. TW also adds to the message DIV an event handler for the custom event "tiddlyfox-have-saved-file"
6. Then TW triggers the custom "tiddlyfox-save-file" event on the message DIV
7. The container app picks up the "tiddlyfox-save-file" event via the handler set up in (3) and responds by:
7a. Saving the file
7b. Removing the message DIV from the DOM
7c. Triggering the "tiddlyfox-have-saved-file" custom event on the message DIV
You may find it helpful to refer to the source of the original TiddlyFox FireFox extension [3] and of TiddlyDesktop [4].
Best wishes
Jeremy