]> Cypherpunks repositories - gostls13.git/commit
misc/wasm: improve detection of Node.js
authorRichard Musiol <mail@richard-musiol.de>
Thu, 25 Oct 2018 21:11:10 +0000 (23:11 +0200)
committerRichard Musiol <neelance@gmail.com>
Thu, 25 Oct 2018 22:13:48 +0000 (22:13 +0000)
commit9627180f0f1f016307f4987cec6594baf90d64ae
treed7827ed3642f6cb3be58a28774d28644099596db
parentdd789550a74817e88466cdb583ae86c4c1426380
misc/wasm: improve detection of Node.js

This commit adds a check of "process.title" to detect Node.js.

The web app bundler Parcel sets "process" to an empty object. This
incorrectly got detected as Node.js, even though the script was
running in a browser.

Fixes #28364.

Change-Id: Iecac7f8fc3cc4ac7ddb42dd43c5385681a3282de
Reviewed-on: https://go-review.googlesource.com/c/144658
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
misc/wasm/wasm_exec.js