web-spawn 0.3.0

`std` spawn replacement for WASM in the browser.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#[cfg(feature = "no-bundler")]
pub(crate) fn get_url() -> js_sys::JsString {
    use wasm_bindgen::prelude::*;

    #[wasm_bindgen]
    extern "C" {
        #[wasm_bindgen(thread_local_v2, js_namespace = ["import", "meta"], js_name = url)]
        static URL: js_sys::JsString;
    }

    URL.with(Clone::clone)
}