From 71ab129e6ce6b33c67629665f1d86d38af1f3586 Mon Sep 17 00:00:00 2001 From: Thomas Steiner Date: Fri, 21 Aug 2026 20:59:20 +0200 Subject: [PATCH] Fix stale requestFileHandles() call in Cross-Origin Storage docs The instantiateWasm example called requestFileHandles(cosHash) with a bare hash and then treated the result as a single FileSystemFileHandle. The API is requestFileHandle() (singular), as already used elsewhere in this document and in src/preamble.js. --- site/source/docs/compiling/CrossOriginStorage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/source/docs/compiling/CrossOriginStorage.rst b/site/source/docs/compiling/CrossOriginStorage.rst index f9fe119fbedcc..c770ad9af6384 100644 --- a/site/source/docs/compiling/CrossOriginStorage.rst +++ b/site/source/docs/compiling/CrossOriginStorage.rst @@ -329,7 +329,7 @@ via a reference to that config object: // read the hash via the outer Module reference instead. const cosHash = Module['wasmHash']; if (cosHash?.value && globalThis.navigator?.crossOriginStorage) { - navigator.crossOriginStorage.requestFileHandles(cosHash) + navigator.crossOriginStorage.requestFileHandle(cosHash) .then(handle => handle.getFile()) .then(f => f.arrayBuffer()) .then(bytes => WebAssembly.instantiate(bytes, imports))