1
0
mirror of https://github.com/golang/go synced 2024-11-17 14:24:50 -07:00
go/misc/wasm
Richard Musiol 8997ec1c4e syscall/js: use stable references to JavaScript values
This commit changes how JavaScript values are referenced by Go code.
After this change, a JavaScript value is always represented by the same
ref, even if passed multiple times from JavaScript to Go. This allows
Go's == operator to work as expected on js.Value (strict equality).
Additionally, the performance of some operations of the syscall/js
package got improved by saving additional roundtrips to JavaScript code.

Fixes #25802.

Change-Id: Ide6ffe66c6aa1caf5327a2d3ddbe48fe7c180461
Reviewed-on: https://go-review.googlesource.com/120561
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-06-26 16:40:09 +00:00
..
go_js_wasm_exec
wasm_exec.html misc/wasm: make wasm_exec.js more flexible 2018-05-18 18:16:50 +00:00
wasm_exec.js syscall/js: use stable references to JavaScript values 2018-06-26 16:40:09 +00:00