Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StorageBackend

Asynchronous storage APIs. All methods return a Promise. All methods take the DOMString IDL type (as it is the lowest common denominator).

Hierarchy

Index

Constructors

Methods

Constructors

constructor

Methods

Abstract clear

  • clear(): Promise<void>
  • When invoked, will empty all keys out of the storage.

    Returns Promise<void>

Abstract getItem

  • getItem(name: string): Promise<null | string>
  • When passed a key name, will return that key's value.

    Parameters

    • name: string

    Returns Promise<null | string>

Abstract removeItem

  • removeItem(name: string): Promise<void>
  • When passed a key name, will remove that key from the storage.

    Parameters

    • name: string

    Returns Promise<void>

Abstract setItem

  • setItem(name: string, value: string): Promise<void>
  • The setItem() method of the StorageBackend interface, when passed a key name and value, will add that key to the storage, or update that key's value if it already exists.

    Parameters

    • name: string
    • value: string

    Returns Promise<void>

Generated using TypeDoc