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)