()
| 134 | |
| 135 | #[cfg(target_arch = "wasm32")] |
| 136 | fn document() -> io::Result<web_sys::HtmlDocument> { |
| 137 | use wasm_bindgen::JsCast; |
| 138 | |
| 139 | let window = web_sys::window() |
| 140 | .ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "window !found"))?; |
| 141 | window |
| 142 | .document() |
| 143 | .ok_or_else(|| io::Error::new(io::ErrorKind::NotFound, "document !found"))? |
| 144 | .dyn_into::<web_sys::HtmlDocument>() |
| 145 | .map_err(|_| io::Error::other("html document cast fail")) |
| 146 | } |
| 147 | |
| 148 | #[cfg(target_arch = "wasm32")] |
| 149 | fn cookie_encode(text: &str) -> String { |
no outgoing calls
no test coverage detected