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