Closed
Description
There will be changes to the syscall/js
API in Go 1.14:
- JavaScript values referenced from Go via js.Value objects can now be garbage collected.
- js.Value values can no longer be compared using the == operator, and instead must be compared using their Equal method.
- js.Value now has IsUndefined, IsNull, and IsNaN methods.
We should make it so that when people update their Go code to target syscall/js
API in Go 1.14, it can continue to build with both GOARCH=wasm (Go WebAssembly) and GOARCH=js (GopherJS).
I think this can be done in a backwards-compatible way by adding the Equal, IsUndefined, IsNull, and IsNaN methods to js.Value.
/cc @hajimehoshi