More Related Content
Similar to GopherJS + Nashorn
Similar to GopherJS + Nashorn (20)
More from Takuya Ueda (20)
GopherJS + Nashorn
- 9. Hello, GopherJS
var java = js.Global.Get("Java")
func start(stage js.Object) {
stage.Set("title", "Hello, GopherJS")
WebView := java.Call("type", "javafx.scene.web.WebView")
webview := WebView.New()
url := “http://gopherjs.github.io/playground”
webview.Call("getEngine").Call("load", url)
Scene := java.Call("type", "javafx.scene.Scene")
scene := Scene.New(webview, 1200, 800)
stage.Call("setScene", scene)
stage.Call("show")
}
func main() {js.Global.Set("start", start)}