2022-02-09 16:00:05 +00:00
|
|
|
const counter = document.getElementById('counter')
|
|
|
|
|
|
|
|
window.electronAPI.handleCounter((event, value) => {
|
2023-04-05 13:42:20 +00:00
|
|
|
const oldValue = Number(counter.innerText)
|
|
|
|
const newValue = oldValue + value
|
|
|
|
counter.innerText = newValue
|
|
|
|
event.sender.send('counter-value', newValue)
|
2022-02-09 16:00:05 +00:00
|
|
|
})
|