Skip to content

Instantly share code, notes, and snippets.

@ivancorrales
Created April 29, 2022 04:55
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/6264e3e808feec93cb81294518e0dc42 to your computer and use it in GitHub Desktop.
Save ivancorrales/6264e3e808feec93cb81294518e0dc42 to your computer and use it in GitHub Desktop.
package main
import (
"syscall/js"
"time"
)
func main() {
document := js.Global().Get("document")
message := document.Call("getElementById", "description")
message.Get("style").Call("setProperty", "display", "block")
time.Sleep(2 * time.Second)
message.Get("style").Call("setProperty", "display", "none")
time.Sleep(2 * time.Second)
message.Get("style").Call("setProperty", "display", "block")
time.Sleep(2 * time.Second)
message.Get("style").Call("setProperty", "display", "none")
time.Sleep(2 * time.Second)
message.Get("style").Call("setProperty", "display", "block")
time.Sleep(2 * time.Second)
message.Get("style").Call("setProperty", "display", "none")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment