Wren a web browser where WebAssembly runs everything, JavaScript included

chrome.storage

The storage areas of an extension (src/extensions/storage.odin; src/page/ext_api.odin). local and sync are written to the profile; session lives in memory until the browser exits or the extension reloads; managed is empty (no policy sets it). Values are JSON.

Gate: permission storage; contexts: Background, Popup, Tab, Content. Source: api/ext_storage.widl.

Events

EventListener's parametersGate
onChangedobject changes, AreaName areaNamechanges: an object of StorageChange by key.

Types

Keys

The keys of get, remove and getBytesInUse: one key, a list of keys, or an object of keys with their defaults.

One of: string or string[] or object.

AreaName

A string: "local", "sync", "managed", "session". chrome.storage.AreaName names them.

StorageChange

PropertyType
oldValue (optional)any
newValue (optional)any

AccessOptions

PropertyType
accessLevelstring

Edit this page on GitHub