add explanation why we need a custom binding
This commit is contained in:
parent
4474769004
commit
d8edb51d6a
1 changed files with 4 additions and 0 deletions
|
@ -47,6 +47,10 @@ fn build_routes() -> router::Router {
|
|||
|
||||
#[wasm_bindgen]
|
||||
extern "C" {
|
||||
// This binds to the fetch function in global scope
|
||||
// In cloudflare workers, there's no Window object
|
||||
// and unfortunately the bionding in web_sys depends
|
||||
// on Window being present.
|
||||
fn fetch(req: &Request) -> Promise;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue