General purpose interface that has two implementations, for localStorage
resp. sessionStorage with “@mozilla.org/dom/localStorage-manager;1” resp.
“@mozilla.org/dom/sessionStorage-manager;1” contract IDs.
This starts async preloading of a storage cache for scope
defined by the principal.
Returns instance of DOM storage object for given principal.
A new object is always returned and it is ensured there is
a storage for the scope created.
aWindow | The parent window. |
aPrincipal | Principal to bound storage to. |
aDocumentURI | URL of the demanding document, used for DOM storage event only. |
aPrivate | Whether the demanding document is running in Private Browsing mode or not. |
Returns instance of DOM storage object for given principal.
If there is no storage managed for the scope, then null is returned and
no object is created. Otherwise, an object (new) for the existing storage
scope is returned.
aWindow | The parent window. |
aPrincipal | Principal to bound storage to. |
aPrivate | Whether the demanding document is running in Private Browsing mode or not. |
Clones given storage into this storage manager.
aStorageToCloneFrom | The storage to copy all items from into this manager. Manager will then return a new and independent object that contains snapshot of data from the moment this method was called. Modification to this new object will not affect the original storage content we cloned from and vice versa. |
Returns true if the storage belongs to the given principal and is managed
(i.e. has been created and is cached) by this storage manager.
@result
true when the storage object is bound with the principal and is managed
by this storage manager.
false otherwise
aPrincipal | Principal to check the storage against. |
aStorage | The storage object to examine. |
@deprecated
Returns instance of localStorage object for aURI’s origin.
This method ensures there is always only a single instance
for a single origin.
Currently just forwards to the createStorage method of this
interface.
Extension developers are strongly encouraged to use getStorage
or createStorage method instead.