haste-compiler-0.2.99: Haskell To ECMAScript compiler

Safe HaskellNone

Haste.LocalStorage

Description

Basic bindings to HTML5 WebStorage.

Synopsis

Documentation

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

Locally store a serializable value.

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

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 ()Source

Remove a value from local storage.