Module Fetch.Ev

Fetch events.

val preload_response : Brr_io.Fetch.Ev.t -> Brr_io.Fetch.Response.t option

preload_response e is a navigation response preload (if any).

val handled : Brr_io.Fetch.Ev.t -> unit

handled e is obscure.

val respond_with : Brr_io.Fetch.Ev.t -> sw:Eio.Switch.t -> (unit -> Brr_io.Fetch.Response.t) -> unit

respond_with e ~sw fn replace the browser's default fetch handling with the response fn (). Function fn is run in a new fiber attached to sw.