Storage config
Generated from crates/niso-storage/include/storage-config.h when the site was built at 7aa23e2.
This is the storage-config section of niso_runtime.h, owned by niso-storage and kept in crates/niso-storage/include/storage-config.h. The build composes it with the other sections in the order crates/niso-compose/sections.txt gives.
Functions: niso_dom_set_storage_directory, niso_dom_set_storage_driver, niso_dom_set_app_origin
Storage (IndexedDB and localStorage; sessionStorage always lives in memory)
is keyed by the document’s origin, and a document with an opaque origin has
none. A document whose URL matches about:blank (with any query or
fragment), as a native app’s does, has the app’s origin: the origin of the
URL given to niso_dom_set_app_origin, which must have a tuple origin (else
NISO_SYNTAX_ERROR) and come before script first uses storage (else
NISO_INVALID_STATE_ERROR); else https://
int32_t niso_dom_set_storage_directory(niso_dom* dom, const char* path, size_t len);int32_t niso_dom_set_storage_driver(niso_dom* dom, const struct niso_storage_driver* driver);int32_t niso_dom_set_app_origin(niso_dom* dom, const char* origin, size_t len);