Skip to content

Instantly share code, notes, and snippets.

@ivancorrales
Created April 29, 2022 05:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivancorrales/47667c5d4c8ed708cfd2bea3fe5160bd to your computer and use it in GitHub Desktop.
Save ivancorrales/47667c5d4c8ed708cfd2bea3fe5160bd to your computer and use it in GitHub Desktop.
package main
import (
"strings"
"syscall/js"
)
func main() {
document := js.Global().Get("document")
input := document.Call("getElementById", "description").
Get("innerHTML")
outputMessage := strings.ToUpper(input.String())
document.Call("getElementById", "descriptionUppercase").
Set("innerHTML", outputMessage)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment