caoge c760052ff9 机车状态修改 il y a 1 an
..
.editorconfig c760052ff9 机车状态修改 il y a 1 an
.eslintrc c760052ff9 机车状态修改 il y a 1 an
LICENSE c760052ff9 机车状态修改 il y a 1 an
README.md c760052ff9 机车状态修改 il y a 1 an
dom-event-types.json c760052ff9 机车状态修改 il y a 1 an
dom-event-types.ts c760052ff9 机车状态修改 il y a 1 an
index.js c760052ff9 机车状态修改 il y a 1 an
package.json c760052ff9 机车状态修改 il y a 1 an
scrape.js c760052ff9 机车状态修改 il y a 1 an
test.js c760052ff9 机车状态修改 il y a 1 an

README.md

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.

name event interfaces interface in dom-event-types
abort Event, ProgressEvent, UIEvent Event
end Event, SpeechSynthesisEvent Event
error ProgressEvent, Event, SpeechSynthesisErrorEvent, UIEvent Event
load UIEvent, ProgressEvent UIEvent
message ServiceWorkerMessageEvent, MessageEvent MessageEvent
error ProgressEvent, Event, SpeechSynthesisErrorEvent, UIEvent Event