MCPcopy Create free account
hub / github.com/PerroEngine/Perro / session_storage

Function session_storage

perro_source/api_modules/perro_web/src/storage.rs:128–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126
127#[cfg(target_arch = "wasm32")]
128fn session_storage() -> io::Result<web_sys::Storage> {
129 let window = web_sys::window()
130 .ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "window !found"))?;
131 let storage = window.session_storage().map_err(js_err)?;
132 storage.ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "sessionStorage !found"))
133}
134
135#[cfg(target_arch = "wasm32")]
136fn document() -> io::Result<web_sys::HtmlDocument> {

Callers 3

load_bytes_implFunction · 0.85
save_bytes_implFunction · 0.85
remove_implFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected