napi-rs/examples/napi/electron-renderer/index.js
Bo 0a0aa36c28
test(napi): update test case for checking electron renderer crash (#1547)
(cherry picked from commit d22598dbb1082de8ac712de954cd5616c838a48d)
2023-03-29 12:53:57 +08:00

7 lines
198 B
JavaScript

const { ipcRenderer } = require('electron')
const { callLongThreadsafeFunction } = require('../index')
callLongThreadsafeFunction(() => {})
ipcRenderer.on('ping', () => ipcRenderer.send('pong'))