1.0.0 • Published 3 years ago
iwv v1.0.0
iwv
a electron package for Inter window invoke with full support for Linux, Mac and Windows.
npm install iwv
need electron >v14
// in main process
const { iwvMain } = require('iwv')
// swap message channle
iwvMain.swapMessageChannle(mainWindow, backendWidows)
// in render window (mainWindow)
import { iwvRenderer } from 'ivw'
(async () => {
const result = await iwvRenderer.invoke('add', someArgument)
})
// in render window (backendWidows)
import { iwvRenderer } from 'ivw'
iwvRenderer.handle('add', async (event, someArgument) => {
const result = await doSomeWork(someArgument)
return result
})
Licensed under MIT license
See the MIT license file.
1.0.0
3 years ago