API / Dom / Storage

Storage

t

RES
type t

getItem

RES
external getItem: (string, t) => option<string> = "getItem"

setItem

RES
external setItem: (string, string, t) => unit = "setItem"

removeItem

RES
external removeItem: (string, t) => unit = "removeItem"

clear

RES
external clear: t => unit = "clear"

key

RES
external key: (int, t) => option<string> = "key"

length

RES
external length: t => int = "length"

localStorage

RES
@val external localStorage: t = "localStorage"

sessionStorage

RES
@val external sessionStorage: t = "sessionStorage"