(handler)
| 1119 | } |
| 1120 | |
| 1121 | function 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 | |
| 1134 | function defineEventHandler(emitter, name, event = name) { |
| 1135 | // 8.1.5.1 Event handlers - basically `on[eventName]` attributes |
no outgoing calls
no test coverage detected
searching dependent graphs…