O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying an alert message

JavaScript

alert("Hello Isomorphic Go!");

GopherJS

js.Global.Call("alert", "Hello Isomorphic Go!")

DOM Binding

dom.GetWindow().Alert("Hello Isomorphic Go!")

One of the most basic operations we can perform is to show an alert message in a modal dialog. In JavaScript, we can display the alert message using the built-in alert function:

alert("Hello Isomorphic Go!");

This line of code will print out the message Hello Isomorphic Go! in a modal window dialog. The alert function blocks further execution until the user dismisses the alert dialog.

When we make a call to the alert method, we are actually calling it in this manner:

window.alert("Hello Isomorphic Go!");

The window object is a global object, representing an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required