Type Alias EventDescriptorFor<TN, EN>

EventDescriptorFor: {
    listener: EventListenerOrEventListenerObjectFor<TN, EN>;
    options: AddEventListenerOptions;
}

Object with a listener that is called when the corresponding event fires and the options that are passed into addEventListener.

Type Parameters

  • TN extends TagName | string

    Tag name of the associated element.

  • EN extends EventNameFor<TN>

    Name of the Event that listener is associated with.

Type declaration

  • listener: EventListenerOrEventListenerObjectFor<TN, EN>

    Callback fired when the event is fired.

  • options: AddEventListenerOptions

    Event listener options object. See MDN documentation for additional details.