Added clocks tool

This commit is contained in:
Leon Mika 2025-09-26 08:13:29 +10:00
parent 8dc2621f87
commit 7073a2d3f2
23 changed files with 1061 additions and 3 deletions

13
cmds/clocks/elems.go Normal file
View file

@ -0,0 +1,13 @@
package main
import "syscall/js"
func findClockElements(id string) htmlElements {
doc := js.Global().Get("document")
rootClockElem := doc.Call("querySelector", "#"+id)
return htmlElements{
locationDiv: rootClockElem.Call("querySelector", ".location"),
timeDiv: rootClockElem.Call("querySelector", ".time"),
dateDiv: rootClockElem.Call("querySelector", ".date"),
}
}