The goog.storage.mechanism.mechanismfactory Namespace

.USER_DATA_SHARED_KEY {string}

The key to shared userData storage.

.create(opt_namespace)

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.

opt_namespace {string=}
Restricts the visibility to given namespace.
returns {goog.storage.mechanism.IterableMechanism}
Created mechanism or null.

.createHTML5LocalStorage(opt_namespace)

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.

opt_namespace {string=}
Restricts the visibility to given namespace.
returns {goog.storage.mechanism.IterableMechanism}
Created mechanism or null.

.createHTML5SessionStorage(opt_namespace)

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.

opt_namespace {string=}
Restricts the visibility to given namespace.
returns {goog.storage.mechanism.IterableMechanism}
Created mechanism or null.

.createIEUserData(opt_namespace)

Returns an IE userData local storage mechanism, or null if unavailable. Using an optional namespace is recommended to provide separation and avoid key collisions.

opt_namespace {string=}
Restricts the visibility to given namespace.
returns {goog.storage.mechanism.IterableMechanism}
Created mechanism or null.