MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / makeHandler

Function makeHandler

www/js/_hyperscript-max.js:11844–11852  ·  view source on GitHub ↗
(encoding, commandList, stub, feature)

Source from the content-addressed store, hash-verified

11842 }
11843 }
11844 function makeHandler(encoding, commandList, stub, feature) {
11845 return function(evt) {
11846 var data = decode(evt.data, encoding);
11847 var context = feature.runtime.makeContext(stub, feature, stub);
11848 context.event = evt;
11849 context.result = data;
11850 commandList.execute(context);
11851 };
11852 }
11853 function decode(data, encoding) {
11854 if (encoding.toLowerCase() === "json") {
11855 return JSON.parse(data);

Callers 1

parseMethod · 0.70

Calls 3

decodeFunction · 0.70
makeContextMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected