Added clocks tool
This commit is contained in:
parent
8dc2621f87
commit
7073a2d3f2
23 changed files with 1061 additions and 3 deletions
13
cmds/clocks/elems.go
Normal file
13
cmds/clocks/elems.go
Normal 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"),
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue