Provides a storage mechanism that uses HTML5 local storage.
extends goog.storage.mechanism.IterableMechanism| Instance Method Summary | |
__iterator__(boolean= opt_keys) ⇒ !goog.iter.IteratorReturns an iterator that iterates over the elements in the storage. Will throw goog.iter.StopIteration after the last element. | |
clear()Remove all key-value pairs. Could be overridden in a subclass, as the default implementation is not very efficient - it iterates over all keys. | |
get(string key) ⇒ ?stringGet the value stored under a key. | |
getCount() ⇒ numberGet the number of stored key-value pairs. Could be overridden in a subclass, as the default implementation is not very efficient - it iterates over all keys. | |
isAvailable() ⇒ booleanDetermines whether or not the mechanism is available. It works only if localStorage is in the window scope. | |
remove(string key)Remove a key and its value. | |
set(string key, string value)Set a value for a key. | |