goog.storage.mechanism.HTML5WebStorage
Classgoog.storage.mechanism.HTML5WebStorage
> goog.storage.mechanism.IterableMechanism
> goog.storage.mechanism.Mechanism
goog.storage.mechanism.HTML5WebStorage(storage)
Provides a storage mechanism that uses HTML5 Web storage.
storage
{?Storage
}
.__iterator__(opt_keys)
Returns an iterator that iterates over the elements in the storage. Will throw goog.iter.StopIteration after the last element.
opt_keys
{boolean
=}
goog.iter.Iterator
}
.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()
.getCount()
Get 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.
number
}
.isAvailable()
Determines whether or not the mechanism is available. It works only if the provided web storage object exists and is enabled.
boolean
}
.remove()
.set()