Update API
hajimehoshi opened this issue · 4 comments
hajimehoshi commented
https://tip.golang.org/pkg/syscall/js/?GOOS=js&GOARCH=wasm
- Now
Global
,Null
andUndefined
are functions. - Add
InstanceOf
function.
hajimehoshi commented
As Global
or other things would be breaking change, my plan is:
- Make GopherWasm enable to compile with GOARCH=wasm without changing the API first
- 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
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
Maybe your point is not related to this issue? But sounds reasonable. I'd be happy if you could send a PR :-)
hajimehoshi commented
Fixed.