forked from Team-Ortix/golang-wasm
16 lines
262 B
Go
16 lines
262 B
Go
|
package wasm
|
||
|
|
||
|
import "syscall/js"
|
||
|
|
||
|
const globalIdent = "__go_wasm__"
|
||
|
|
||
|
var throwWrapper js.Value
|
||
|
|
||
|
func init() {
|
||
|
var err error
|
||
|
throwWrapper, err = Global().Get(globalIdent, "__throw__")
|
||
|
if err != nil {
|
||
|
panic("JS wrapper __go_wasm__.__throw__ not found")
|
||
|
}
|
||
|
}
|