Let's start off with an example to display an alert dialog. Earlier in this chapter, we saw how we could accomplish displaying the alert dialog using the Call method of the js.Global object and the GopherJS DOM bindings. Figure 3.9 depicts the user interface of our first example:
The user interface consists of an input text field, where the user can enter a custom message to display in the alert dialog. Following the text field are two buttons:
- The first button will display the alert dialog using the Call method on the js.Global object
- The second button will display ...