Skip to content

Commit a16643b

Browse files
authored
Fix stale requestFileHandles() call in Cross-Origin Storage docs (#27585)
The `instantiateWasm` example in `site/source/docs/compiling/CrossOriginStorage.rst` called `navigator.crossOriginStorage.requestFileHandles(cosHash)` with a bare hash and then treated the result as a single `FileSystemFileHandle` (`.then(handle => handle.getFile())`). The API is `requestFileHandle()` (singular). The plural form was an early draft that took an array of hashes and returned an array of handles; it was [removed in favor of the singular form](WICG/cross-origin-storage#61). The rest of this document — and the actual implementation in `src/preamble.js` — already use the singular form, so this example was the only stale call site. Docs-only, one line.
1 parent d0d3829 commit a16643b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

site/source/docs/compiling/CrossOriginStorage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ via a reference to that config object:
329329
// read the hash via the outer Module reference instead.
330330
const cosHash = Module['wasmHash'];
331331
if (cosHash?.value && globalThis.navigator?.crossOriginStorage) {
332-
navigator.crossOriginStorage.requestFileHandles(cosHash)
332+
navigator.crossOriginStorage.requestFileHandle(cosHash)
333333
.then(handle => handle.getFile())
334334
.then(f => f.arrayBuffer())
335335
.then(bytes => WebAssembly.instantiate(bytes, imports))

0 commit comments

Comments
 (0)