From cc5c1a3e208d63a22e7b3f96c313bdb366793648 Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Sat, 21 Mar 2020 22:03:53 +0500 Subject: [PATCH] Updated example. --- examples/helloworld/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/helloworld/main.go b/examples/helloworld/main.go index 259c7dd..58d8c7d 100644 --- a/examples/helloworld/main.go +++ b/examples/helloworld/main.go @@ -41,9 +41,11 @@ func constructBody() { startTestButton := elements.NewButton(&elements.ButtonOptions{ Class: "button is-large is-rounded is-primary", + ID: "main_button", Text: "Click Me!", OnClickHandler: func(e *js.Object) { common.Log("Button clicked! Hooray") + js.Global.Get(common.HTMLElementDocument).Call("getElementById", "main_button").Set("textContent", "Clicked!") }, }) centerDiv.AddChild(startTestButton)