翻譯不完整。請協助 翻譯此英文文件

StorageArea is an object representing a storage area.

Type

Values of this type are objects.

Methods

storage.StorageArea.get()
Retrieves one or more items from the storage area.
storage.StorageArea.getBytesInUse()
Gets the amount of storage space (in bytes) used one or more items being stored in the storage area.
storage.StorageArea.set()
Stores one or more items in the storage area. If an item already exists, its value will be updated.
storage.StorageArea.remove()
Removes one or more items from the storage area.
storage.StorageArea.clear()
Removes all items from the storage area.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxOperaFirefox for Android
Basic supportChrome Full support YesEdge Full support 14Firefox Full support 45Opera Full support YesFirefox Android Full support 48
clearChrome Full support YesEdge Full support 14Firefox Full support 45Opera Full support 33Firefox Android Full support 48
getChrome Full support YesEdge Full support 14Firefox Full support 45Opera Full support 33Firefox Android Full support 48
getBytesInUseChrome Full support YesEdge Full support 14Firefox No support NoOpera Full support 33Firefox Android No support No
removeChrome Full support YesEdge Full support 14Firefox Full support 45Opera Full support 33Firefox Android Full support 48
setChrome Full support YesEdge Full support 14
Notes
Full support 14
Notes
Notes storage is limited to 1MB per value.
Firefox Full support 45Opera Full support 33Firefox Android Full support 48

Legend

Full support  
Full support
No support  
No support
See implementation notes.
See implementation notes.

Acknowledgements

This API is based on Chromium's chrome.storage 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.

文件標籤與貢獻者

此頁面的貢獻者: chrisdavidmills
最近更新: chrisdavidmills,