function defineCustomEventTarget(eventNames) {
    /** CustomEventTarget */
    function CustomEventTarget() {
        EventTarget.call(this);
    }

    CustomEventTarget.prototype = Object.create(EventTarget.prototype, {
        constructor: {
            value: CustomEventTarget,
            configurable: true,
            writable: true,
        },
    });

    for (let i = 0; i < eventNames.length; ++i) {
        defineEventAttribute(CustomEventTarget.prototype, eventNames[i]);
    }

    return CustomEventTarget
}
function defineCustomEventTarget(eventNames) {
    
    function CustomEventTarget() {
        EventTarget.call(this);
    }

    CustomEventTarget.prototype = Object.create(EventTarget.prototype, {
        constructor: {
            value: CustomEventTarget,
            configurable: true,
            writable: true,
        },
    });

    for (let i = 0; i < eventNames.length; ++i) {
        defineEventAttribute(CustomEventTarget.prototype, eventNames[i]);
    }

    return CustomEventTarget
}
function defineCustomEventTarget ( eventNames ) { /** CustomEventTarget */ function CustomEventTarget ( ) { EventTarget . call ( this ) ; } CustomEventTarget . prototype = Object . create ( EventTarget . prototype , { constructor : { value : CustomEventTarget , configurable : true , writable : true , } , } ) ; for ( let i = 0 ; i < eventNames . length ; ++ i ) { defineEventAttribute ( CustomEventTarget . prototype , eventNames [ i ] ) ; } return CustomEventTarget }
Define a custom EventTarget with event attributes.
@param {string[]} eventNames Event names for event attributes.
@returns {EventTarget} The custom EventTarget.
@private
Define a custom EventTarget with event attributes .