Interface nsIDOMSessionStorageManagerType

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • 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

    Parameters

    • aPrincipal: nsIPrincipal

      Principal to check the storage against.

    • aStorage: Storage

      The storage object to examine.

    Returns bool

  • Clones given storage into this storage manager.

    Parameters

    • aStorageToCloneFrom: Storage

      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 void

  • 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.

    Parameters

    • aWindow: mozIDOMWindow

      The parent window.

    • aPrincipal: nsIPrincipal

      Principal to bound storage to.

    • aStoragePrincipal: nsIPrincipal

      StoragePrincipal to bound storage to.

    • aDocumentURI: string

      URL of the demanding document, used for DOM storage event only.

    • aPrivate: bool

      Whether the demanding document is running in Private Browsing mode or not.

    Returns Storage

  • Returns a SessionStorageCache object for the principal scope.

    Parameters

    • aPrincipal: nsIPrincipal

      Principal to bound storage to.

    • aStoragePrincipal: nsIPrincipal

      StoragePrincipal to bound storage to.

    Returns SessionStorageCacheAddRefed

  • DEPRECATED. The only good reason to use this was if you were writing a test and wanted to hackily determine if a preload happened. That's now covered by nsILocalStorageManager.isPreloaded and you should use that if that's what you want. If LSNG is in use, this will throw.

    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.

    Parameters

    • aWindow: mozIDOMWindow

      The parent window.

    • aPrincipal: nsIPrincipal

      Principal to bound storage to.

    • aStoragePrincipal: nsIPrincipal

      StoragePrincipal to bound storage to.

    • aPrivate: bool

      Whether the demanding document is running in Private Browsing mode or not.

    Returns Storage

  • This starts async preloading of a storage cache for scope defined by the principal and storage principal.

    Because of how multi-e10s support was implemented in bug 1285898, the StorageCache instance can no longer use a timer to keep itself alive. So a Storage instance is returned if precaching believes the storage principal may have localStorage data. (Previously the StorageCache would be brought into existence and kept alive by the timer so that it could be returned if a call to createStorage was made due to a request by the page.)

    Parameters

    • aPrincipal: nsIPrincipal
    • aStoragePrincipal: nsIPrincipal

    Returns Storage

Generated using TypeDoc