Saved data for the url origin (protocol, host name, port) across browser sessions.
This data doesn't expire and won't be cleared when the page is closed. The only exception is "incognito mode", where all data is cleared once the last "private" tab is closed.
An Interface for replacing the value of the entry with the given key
or adding key and value as a new entry if the key doesn't exist.
import Json.Decode
import Web
projectSaveToLocalStorage : Project -> Web.Interface future_
projectSaveToLocalStorage =
\project ->
Web.LocalStorage.set "project"
(project |> projectJsonEncode |> Json.Encode.encode 0)Note: This will trigger an event for all other tabs of the same url origin
that can be listened to using setOnADifferentTabListen
An Interface for deleting the entry with the given key if it exists.
Note: This will trigger an event for all other tabs of the same url origin
that can be listened to using removeOnADifferentTabListen
An Interface for keeping an eye on
when the local storage on a different tab with the same url origin is set.
When the oldValue is Nothing, no entry with that key existed.
An Interface for keeping an eye on
when the local storage on a different tab with the same url origin is removed.
An
Interfacefor reading the value of the entry with the given key. Comes back withNothingif that key doesn't exist.