Storage
Generated from idl/html.webidl when the site was built at 7aa23e2.
Storage is an interface in idl/html.webidl, exposed in Window. What it does is on MDN; this page says what niso has of it.
The standard declares getItem, setItem and removeItem as the named property getter, setter and deleter; niso-idl takes named properties as anonymous operations, so they appear twice.
Platform notes
Section titled “Platform notes”Web Storage runs on the storage driver, SQLite by default, which a host can replace (docs/storage.md). A native app’s document is at about:blank with the app’s origin, https://<app>.app.niso, so its storage is per app.
The origin comes from the bundle id (DECISIONS).
The origin comes from the package name (DECISIONS).
Status
Section titled “Status”The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).
| Feature | On the web | In niso | Members |
|---|---|---|---|
| localStorage and sessionStorage | Widely available | Partial 95% 1239 of 1291 subtests pass | 7 |
Members
Section titled “Members”length
Section titled “length”readonly attribute unsigned long length;int32_t niso_storage_get_length(niso_dom* dom, niso_handle self, uint32_t* out);DOMString? key(unsigned long index);int32_t niso_storage_key(niso_dom* dom, niso_handle self, uint32_t index, niso_str* out);getItem()
Section titled “getItem()”DOMString? getItem(DOMString key);int32_t niso_storage_get_item(niso_dom* dom, niso_handle self, const char* key, size_t key_len, niso_str* out);setItem()
Section titled “setItem()”undefined setItem(DOMString key, DOMString value);int32_t niso_storage_set_item(niso_dom* dom, niso_handle self, const char* key, size_t key_len, const char* value, size_t value_len);removeItem()
Section titled “removeItem()”undefined removeItem(DOMString key);int32_t niso_storage_remove_item(niso_dom* dom, niso_handle self, const char* key, size_t key_len);clear()
Section titled “clear()”undefined clear();int32_t niso_storage_clear(niso_dom* dom, niso_handle self);getter
Section titled “getter”getter DOMString? (DOMString key);setter
Section titled “setter”setter undefined (DOMString key, DOMString value);deleter
Section titled “deleter”deleter undefined (DOMString key);