mirror of
https://github.com/electron/electron.git
synced 2026-01-14 18:08:07 -05:00
9 lines
275 B
JavaScript
9 lines
275 B
JavaScript
const counter = document.getElementById('counter')
|
|
|
|
window.electronAPI.handleCounter((event, value) => {
|
|
const oldValue = Number(counter.innerText)
|
|
const newValue = oldValue + value
|
|
counter.innerText = newValue
|
|
event.sender.send('counter-value', newValue)
|
|
})
|