2023-12-09 22:59:31 +00:00
|
|
|
//go:build js && wasm
|
2020-01-02 01:50:15 +00:00
|
|
|
// +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)
|
|
|
|
}
|