2022-02-09 08:00:05 -08:00
|
|
|
const counter = document.getElementById('counter')
|
|
|
|
|
2023-11-01 13:46:25 -04:00
|
|
|
window.electronAPI.onUpdateCounter((value) => {
|
2023-04-05 06:42:20 -07:00
|
|
|
const oldValue = Number(counter.innerText)
|
|
|
|
const newValue = oldValue + value
|
2023-11-01 13:46:25 -04:00
|
|
|
counter.innerText = newValue.toString()
|
|
|
|
window.electronAPI.counterValue(newValue)
|
2022-02-09 08:00:05 -08:00
|
|
|
})
|