Created
April 28, 2022 19:54
-
-
Save ivancorrales/66bb7727bf55643351565cf3a7772e0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"syscall/js" | |
) | |
func main() { | |
document := js.Global().Get("document") | |
h2 := document.Call("createElement", "h2") | |
h2.Set("innerHTML", "Sample 3 | Appending HTML elements") | |
div := document.Call("getElementById", "main") | |
div.Call("appendChild", h2) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment