haste-compiler-0.5.5.0: Haskell To ECMAScript compiler

Safe HaskellNone
LanguageHaskell98

Haste.LocalStorage

Description

Basic bindings to HTML5 WebStorage.

Synopsis

Documentation

setItem :: Serialize a => String -> a -> IO ()

Locally store a serializable value.

getItem :: Serialize a => String -> IO (Either String a)

Load a serializable value from local storage. Will fail if the given key does not exist or if the value stored at the key does not match the requested type.

removeItem :: String -> IO ()

Remove a value from local storage.