Skip to content

syscall/js: support for Go 1.14 changes #962

Closed
@dmitshur

Description

@dmitshur

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions