gopherjs / gopherwasm

This package is deprecated. Use syscall/js of GopherJS instead.
BSD 2-Clause "Simplified" License
79 stars 5 forks source link

Update API #1

Closed hajimehoshi closed 6 years ago

hajimehoshi commented 6 years ago

https://tip.golang.org/pkg/syscall/js/?GOOS=js&GOARCH=wasm

hajimehoshi commented 6 years ago

As Global or other things would be breaking change, my plan is:

  1. Make GopherWasm enable to compile with GOARCH=wasm without changing the API first
  2. Change the API to be same as syscall/js later

The problem is when to do 2. Whenever I do this, I need to provide advance warning.

elliott5 commented 6 years ago

The GopherJS version is around 1Mb smaller if "fmt" is not included, but reflect used instead:

        panic(`fmt.Sprintf("invalid arg: %T", x) ` + reflect.TypeOf(x).String())
hajimehoshi commented 6 years ago

Maybe your point is not related to this issue? But sounds reasonable. I'd be happy if you could send a PR :-)

hajimehoshi commented 6 years ago

Fixed.