sysend.js
sysend.js copied to clipboard
Add API to send to primary window
This can be implemented like this:
function sendToPrimary(data) {
return sysend.list().then(list => {
return list.find(window => window.primary);
}).then(primary => {
sysend.post(primary.id, data);
});
}
It can be handy to allow:
sysend.post('primary', data);