Description
During the Go 1.21 dev cycle, we updated from Node 14 to 18, which seems to provide the Fetch API, at least enough to cause it to be turned on during tests and not use the fake network. Since the HTTP server part is still implemented only as a fake network, that caused all tests/examples that start an HTTP server and send requests to it to fail. See #57613 for details.
Unfortunately the current implementation of jsFetchDisabled
:
go/src/net/http/roundtrip_js.go
Lines 47 to 51 in 9fc8436
Intersects poorly with wasm_exec.js that sets a "process" global whenever it's not already there:
Lines 62 to 73 in 9fc8436
So it ends up inadvertently disabling Fetch API not only during testing as intended, but also in browsers that use an unmodified copy of wasm_exec.js.
CC @golang/js, @golang/wasm.