Skip to content

Instantly share code, notes, and snippets.

View David-OConnor's full-sized avatar

David O'Connor David-OConnor

View GitHub Profile
use wasm_bindgen::prelude::*;
pub fn log<S: ToString>(text: S) {
web_sys::console::log_1(&text.to_string().into());
}
pub fn fetch(
method: &str,
url: &str,
callback: Box<Fn(JsValue)>)