Updated example.

This commit is contained in:
Stanislav Nikitin 2020-03-21 22:03:53 +05:00
parent 490c5e5cc5
commit cc5c1a3e20
No known key found for this signature in database
GPG Key ID: 106900B32F8192EE
1 changed files with 2 additions and 0 deletions

View File

@ -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)