Skip to content
This repository was archived by the owner on Apr 30, 2019. It is now read-only.

Commit fc6eb78

Browse files
committed
Make GopherWasm compileable
This enables to compile GopherWasm with the latest Go compiler. I plan to change the API to be same as syscall/js later. Issue: #1
1 parent 369ef62 commit fc6eb78

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

js/js_wasm.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import (
1313
)
1414

1515
var (
16-
Undefined = js.Undefined
17-
Null = js.Null
18-
Global = js.Global
16+
Undefined = js.Undefined()
17+
Null = js.Null()
18+
Global = js.Global()
1919
)
2020

2121
type Callback = js.Callback
@@ -41,15 +41,15 @@ type Error = js.Error
4141
type Value = js.Value
4242

4343
var (
44-
int8Array = js.Global.Get("Int8Array")
45-
int16Array = js.Global.Get("Int16Array")
46-
int32Array = js.Global.Get("Int32Array")
47-
int64Array = js.Global.Get("Int64Array")
48-
uint16Array = js.Global.Get("Uint16Array")
49-
uint32Array = js.Global.Get("Uint32Array")
50-
uint64Array = js.Global.Get("Uint64Array")
51-
float32Array = js.Global.Get("Float32Array")
52-
float64Array = js.Global.Get("Float64Array")
44+
int8Array = js.Global().Get("Int8Array")
45+
int16Array = js.Global().Get("Int16Array")
46+
int32Array = js.Global().Get("Int32Array")
47+
int64Array = js.Global().Get("Int64Array")
48+
uint16Array = js.Global().Get("Uint16Array")
49+
uint32Array = js.Global().Get("Uint32Array")
50+
uint64Array = js.Global().Get("Uint64Array")
51+
float32Array = js.Global().Get("Float32Array")
52+
float64Array = js.Global() .Get("Float64Array")
5353
)
5454

5555
func ValueOf(x interface{}) Value {

0 commit comments

Comments
 (0)