-
-
Notifications
You must be signed in to change notification settings - Fork 813
Description
Suggested by Markus Holtermann on Twitter, who is building https://github.com/MarkusH/datasette-chartjs
I've been looking at datasette-vega for how you persist chart settings between form submissions. I've adopted that for datasette-chartjs. Any thoughts on adding a public JS API to #datasette itself, that plugins can rely on?
I'm talking about functions like onFragmentChange, serialize, unserialize, ... That turn an object into a URL encoded string and put it into the location's hash. And also updating all links/forms automatically.
Essentially, a plugins could do something like
document.datasette.setConfigValue('prefix', 'foo', 'bar')and.getConfigValue('prefix', 'foo'). And the functions would take care of updating document.location.hash, all (necessary) a.href and form.action