MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / dispatch

Function dispatch

www/js/ext/eventsource.js:311–322  ·  view source on GitHub ↗
(stub, eventType, evt)

Source from the content-addressed store, hash-verified

309 }, timeout);
310 }
311 function dispatch(stub, eventType, evt) {
312 for (var i = 0; i < stub.listeners.length; i++) {
313 var listener = stub.listeners[i];
314 if (matchesEventPattern(listener.type, eventType)) {
315 try {
316 listener.handler(evt);
317 } catch (e) {
318 console.error("Error in SSE handler for '" + listener.type + "':", e);
319 }
320 }
321 }
322 }
323 function makeHandler(encoding, commandList, stub, feature) {
324 return function(evt) {
325 var data = decode(evt.data, encoding);

Callers 3

createStubFunction · 0.70
startConnectionFunction · 0.70
readStreamFunction · 0.70

Calls 2

matchesEventPatternFunction · 0.70
handlerMethod · 0.45

Tested by

no test coverage detected