MCPcopy Create free account
hub / github.com/11ty/dev-server / sendUpdateNotification

Method sendUpdateNotification

server.js:852–862  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

850
851 // Broadcasts to all open browser windows
852 sendUpdateNotification(obj) {
853 if(!this.updateServer?.clients) {
854 return;
855 }
856
857 for(let client of this.updateServer.clients) {
858 if (client.readyState === WebSocket.OPEN) {
859 client.send(JSON.stringify(obj));
860 }
861 }
862 }
863
864 // Helper for promisifying close methods with callbacks, like http.Server or ws.WebSocketServer.
865 async _closeServer(server) {

Callers 4

setupReloadNotifierMethod · 0.95
closeMethod · 0.95
sendErrorMethod · 0.95
reloadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected