MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / defineCustomEventTarget

Function defineCustomEventTarget

out/cli.cjs:10184–10199  ·  view source on GitHub ↗
(eventNames)

Source from the content-addressed store, hash-verified

10182 );
10183 }
10184 function defineCustomEventTarget(eventNames) {
10185 function CustomEventTarget() {
10186 EventTarget2.call(this);
10187 }
10188 CustomEventTarget.prototype = Object.create(EventTarget2.prototype, {
10189 constructor: {
10190 value: CustomEventTarget,
10191 configurable: true,
10192 writable: true
10193 }
10194 });
10195 for (let i3 = 0; i3 < eventNames.length; ++i3) {
10196 defineEventAttribute(CustomEventTarget.prototype, eventNames[i3]);
10197 }
10198 return CustomEventTarget;
10199 }
10200 function EventTarget2() {
10201 if (this instanceof EventTarget2) {
10202 listenersMap.set(this, /* @__PURE__ */ new Map());

Callers 1

EventTarget2Function · 0.85

Calls 2

defineEventAttributeFunction · 0.85
createMethod · 0.45

Tested by

no test coverage detected