StorageArea is an object representing a storage area.


Values of this type are objects.



Retrieves one or more items from the storage area.

storage.StorageArea.getBytesInUse() (en-US)

Gets the amount of storage space (in bytes) used one or more items being stored in the storage area.

storage.StorageArea.set() (en-US)

Stores one or more items in the storage area. If an item already exists, its value will be updated.

storage.StorageArea.remove() (en-US)

Removes one or more items from the storage area.

storage.StorageArea.clear() (en-US)

Removes all items from the storage area.

Browser compatibility

BCD tables only load in the browser

備註: This API is based on Chromium's API. This documentation is derived from storage.json in the Chromium code.

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.