1
0
mirror of https://github.com/golang/go synced 2024-11-24 06:40:17 -07:00
go/misc
Richard Musiol 680caf1535 misc/wasm: expect environment to provide polyfills
The list of environments to support with wasm_exec.js was becoming too
large to maintain. With this change, wasm_exec.js expects that the
environment provides all necessary polyfills.

The standardized "globalThis" is used for accessing the environment.
wasm_exec.js now only provides stub fallbacks for globalThis.fs and
globalThis.process.

All code specific to Node.js is now in a separate file.

Change-Id: I076febbd94d4d7845260faad972f450f74a7b983
Reviewed-on: https://go-review.googlesource.com/c/go/+/347353
Trust: Richard Musiol <neelance@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2021-10-16 14:50:21 +00:00
..
android all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
arm
cgo cmd/link: disable weak reference in itab if build with "-linkshared" 2021-10-13 15:12:46 +00:00
chrome/gophertool docs: fix case of GitHub 2021-03-05 02:35:21 +00:00
ios all: use bytes.Cut, strings.Cut 2021-10-06 15:53:04 +00:00
linkcheck all: use bytes.Cut, strings.Cut 2021-10-06 15:53:04 +00:00
reboot all: gofmt more (but vendor, testdata, and top-level test directories) 2021-08-13 20:45:17 +00:00
swig
trace all: use HTML5 br tags 2021-03-13 03:38:42 +00:00
wasm misc/wasm: expect environment to provide polyfills 2021-10-16 14:50:21 +00:00
editors
go.mod cmd/cgo: update to handle ast.IndexListExpr 2021-10-07 18:02:14 +00:00