Folks,
In this discussion Consider solutions to avoid losing data when using tiddlyhost on multiple devices · Issue #219 · simonbaird/tiddlyhost · GitHub Mario pointed out
There is the Broadcast Channel API - Web APIs | MDN which allows us to create a message that is broadcasted, whenever a new tab, window or even an iframe is opened from the same origin.
This seems to me an example where developer contributions to tiddlywiki could be used to empower tools and innovation on tiddlywiki, rather than to solve specific problems. Although in this case Mario’s suggestion for the specific issue of multi-device wikis is of course a valid one.
My idea here is to provide a small set of Broadcast Channel macros and actions within a plugin. Such as open/create channel name, list channels opened, broadcast to channel, read channel (get) and ideally even an action that that will be triggered on any broadcast or if a specific string is broadcasted.
This is to me similar to Eric’s Get/Set cookies js macros, my set/get windows.name /target windows, also a reset dirty macro I collected, in that they are very simple javascript - interfacing with the browser in a generic way and exposing useful features.
Other examples may include;
- Get geo-location
- Get/Set unique session ID’s
The idea is these just expose features without any judgement to how these will be used, I will not bore you but I see a lot of opportunities for really interesting solutions built on top of tiddlywiki.
- We may want to encourage some de facto or de jure standards that can be applied on wikis like wikinames and a standard broadcast channel for those cases where it will prove useful for different solutions to used a shared standard.
Advanced examples
In time I see people building an in browser interwiki messaging environment perhaps to request a search in another wiki, and return tiddler titles and be able to apply a permalink and target windows to then open them from one wiki in another.
The key idea here is exposing tools and features without too much judgment how they will be used. Many of the Javascript dev’s here could do dozens of these in your sleep (Even I am starting to).
Always keep KISS/MVP in mind and set them free.