panelIDstring - Panel ID.messagestring - Ipc message....args... - Whatever arguments the message needs.callbackfunction - You can specify a callback function to receive IPC reply at the last or the 2nd last argument.timeoutnumber - You can specify a timeout for the callback at the last argument. If no timeout specified, it will be 5000ms.
Send message with ...args to panel defined in renderer process asynchronously. It is possible to add a callback as the last or the 2nd last argument to receive replies from the IPC receiver.
Example:
Send IPC message (renderer process)
const panel = require('electron-panel');
panel.send('foobar', 'foobar:say-hello', err => {
if ( err.code === 'ETIMEOUT' ) {
console.error('Timeout for ipc message foobar:say-hello');
return;
}
console.log('foobar replied');
});elHTMLElement
Check if an element is a panel frame or in a panel frame.
panelIDstring
Find panel frame via panelID.
Close all panels. If any of the panel cancel close, none of the panel will be closed.