mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
9 lines
267 B
JavaScript
9 lines
267 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)
|
|
})
|