doodle/pkg/native/browser_wasm.go

15 lines
249 B
Go
Raw Normal View History

// +build js,wasm
package native
import "syscall/js"
// OpenURL opens a new window to the given URL, for WASM environment.
func OpenURL(url string) {
js.Global().Get("window").Call("open", url)
}
2021-05-02 19:06:34 +00:00
func OpenLocalURL(url string) {
OpenURL(url)
}