Harry Chilinguerian
Harry Chilinguerian
Your Employee class shoul extend the EmbeddedDocument class which needs to be pulled in. //add this to top var EmbeddedDocument = require('camo').EmbeddedDocument; //change this class Employee extends Document { //to...
`app.ws('/', function(ws, req) { ws.on('message', function(msg) { expressWs.getWss().clients.forEach(function(client) { if (client.upgradeReq.url === req.url){client.send(msg)}; }); }); });` That's what I'm using right now. Seems to work OK.
A work around: let ev = document.createEvent("customevent"); ev.initCustomEvent('dcs-update', true, true, { name: 'Harry' }); document.dispatchEvent(ev); This is supposed to be deprecated but works in the newest NWjs. Of course a...