diff --git a/apps/chuzz/Cargo.toml b/apps/chuzz/Cargo.toml index b26a7f5..e8720a0 100644 --- a/apps/chuzz/Cargo.toml +++ b/apps/chuzz/Cargo.toml @@ -116,6 +116,10 @@ tauri.workspace = true tauri-runtime-blitz.workspace = true [dev-dependencies] +# `flavor = "multi_thread"` in the script-fetch test: the blocking fetch takes +# the `block_in_place` path, which only the multi-threaded runtime has, and +# that is the path the capture actually uses. +tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread", "sync", "time"] } # Assembles `fixtures/panel.wat` into a module in-process, so the capture test # owns its guest instead of borrowing blitz-wasm's demo, and so it needs no # wasm32 target and no nested cargo build. See the header of that file. diff --git a/apps/chuzz/src/document_loader.rs b/apps/chuzz/src/document_loader.rs index b29b79d..9ac7725 100644 --- a/apps/chuzz/src/document_loader.rs +++ b/apps/chuzz/src/document_loader.rs @@ -312,20 +312,100 @@ pub(crate) const WEB_API_SHIM: &str = r#" } })(); "#; -/// Serves the sources prefetched above, falling back to the default fetcher -/// for `file:` and `data:` URLs. +/// Serves the sources prefetched above, and fetches the rest from the network. +/// +/// The prefetch can only see the scripts the parsed HTML names. A page that +/// builds a `