1.1.0 • Published 2 years ago

dom-event-types v1.1.0

Weekly downloads
788,849
License
MIT
Repository
github
Last release
2 years ago

dom-event-types

An object of DOM event types and their interfaces.

Data scraped from MDN.

Usage

npm install --save-dev dom-event-types
const eventInterfaces = require("dom-event-interfaces");

console.log(eventInterfaces);
//=> { "abort": { "eventInterface": "Event", "bubbles": false, "cancelable": false }, ... }

Shape

{
  [eventType]: {
    eventInterface: string
    cancelable: Boolean
    bubbles: Boolean
  }
}

If cancelable or bubbles are undefined, it's because there is no entry for them on MDN.

Duplicates

Some events have duplicate interfaces. To make this package easier to use, duplicates have been removed. You can see a list of events with duplicate interfaces, and the interface that's exported in this project.

nameevent interfacesinterface in dom-event-types
abortEvent, ProgressEvent, UIEventEvent
endEvent, SpeechSynthesisEventEvent
errorProgressEvent, Event, SpeechSynthesisErrorEvent, UIEventEvent
loadUIEvent, ProgressEventUIEvent
messageServiceWorkerMessageEvent, MessageEventMessageEvent
errorProgressEvent, Event, SpeechSynthesisErrorEvent, UIEventEvent