goog.storage.mechanism.mechanismfactory
Functions
create( opt_namespace ) → (goog.storage.mechanism.IterableMechanism|null)
(goog.storage.mechanism.IterableMechanism|null)
Returns the best local storage mechanism, or null if unavailable. Local storage means that the database is placed on user's computer. The key-value database is normally shared between all the code paths that request it, so using an optional namespace is recommended. This provides separation and makes key collisions unlikely.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
createHTML5LocalStorage( opt_namespace ) → (goog.storage.mechanism.IterableMechanism|null)
(goog.storage.mechanism.IterableMechanism|null)
Returns an HTML5 local storage mechanism, or null if unavailable. Since the HTML5 local storage does not support namespaces natively, and the key-value database is shared between all the code paths that request it, it is recommended that an optional namespace is used to provide key separation employing a prefix.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
createHTML5SessionStorage( opt_namespace ) → (goog.storage.mechanism.IterableMechanism|null)
(goog.storage.mechanism.IterableMechanism|null)
Returns an HTML5 session storage mechanism, or null if unavailable. Since the HTML5 session storage does not support namespaces natively, and the key-value database is shared between all the code paths that request it, it is recommended that an optional namespace is used to provide key separation employing a prefix.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
createIEUserData( opt_namespace ) → (goog.storage.mechanism.IterableMechanism|null)
(goog.storage.mechanism.IterableMechanism|null)
Returns an IE userData local storage mechanism, or null if unavailable. Using an optional namespace is recommended to provide separation and avoid key collisions.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
Properties
USER_DATA_SHARED_KEY → string
string
The key to shared userData storage.