Remember partial filled forms
I think having something like this would be very useful:
val remember : ?delay:float -> ?scope:session -> html elt -> html elt
(it could return unit instead, I don't care)
which role would be to remember the partially filled forms ("forms" in the general meaning, not the HTML one, such that it includes any input (etc.) regardless of its parent nodes) that have never been submitted. One existing example (unless it's an undesired bug), if one writes something in the Leave a comment field on https://github.com/ocaml/ocaml.org/pull/734, doesn't submit it, logs out, logs in with another account, the comment is still present.
One hypothetical however classic application is when one partially fills a form in a popup, exits the popup by accident and goes back to the form: everything has been forgotten. For some forms, it could be very nice to have the browser remember the entered values, via a cookie (or actually it could be something else, for instance we could want the server to remember it, a little like "automatically saved drafts" in Gmail).
Or perhaps Ocsigen already has that??
Hi ! I think such "element with memory" behavior can be achieved with global elements. (with the fancy behavior that it would work even if a page without that element is loaded before a new one with that element, as far as I understand)