MCPcopy Index your code
hub / github.com/nodejs/node / makeEventHandler

Function makeEventHandler

lib/internal/event_target.js:1121–1132  ·  view source on GitHub ↗
(handler)

Source from the content-addressed store, hash-verified

1119}
1120
1121function makeEventHandler(handler) {
1122 // Event handlers are dispatched in the order they were first set
1123 // See https://github.com/nodejs/node/pull/35949#issuecomment-722496598
1124 function eventHandler(...args) {
1125 if (typeof eventHandler.handler !== 'function') {
1126 return;
1127 }
1128 return ReflectApply(eventHandler.handler, this, args);
1129 }
1130 eventHandler.handler = handler;
1131 return eventHandler;
1132}
1133
1134function defineEventHandler(emitter, name, event = name) {
1135 // 8.1.5.1 Event handlers - basically `on[eventName]` attributes

Callers 1

setFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…