staticdata.dev
Menu
Datasets About Contact

DOM Events

A curated reference of 109 common DOM events drawn from the MDN Web Docs Event reference and the WHATWG/W3C specifications. Each record captures the event name, its category (mouse, keyboard, touch, form, window, focus, drag, pointer, media, clipboard, animation, device, or dom), the Web API interface that represents the event object, whether the event bubbles through the DOM, whether it is cancelable (i.e. its default action can be prevented via preventDefault()), and a concise description of when the event fires.

v1.0.0 MIT 109 records Updated 2026-10-05 stable Source:  MDN Web Docs — Event reference, WHATWG HTML Living Standard

Quick fetch

Stable URL. CORS-enabled. No auth.

bash
curl https://staticdata.dev/v1/dom-events.json

Or use as a typed import: import { domEvents } from "https://staticdata.dev/v1/dom-events.ts"

Formats

  • JSON 26.0 KB

    /v1/dom-events.json

    Open

    min: 21.5 KB · /v1/dom-events.min.json

  • CSV 13.5 KB

    /v1/dom-events.csv

    Open
  • TypeScript 26.1 KB

    /v1/dom-events.ts

    export const domEvents

    type DomEvent = (typeof domEvents)[number]

    Open

Schema

Each record in the dataset has the following shape.

Schema
Field Type Description Example
name string The event type string passed to addEventListener click
category string Functional category of the event mouse
interface string Web API interface representing the event object MouseEvent
bubbles boolean Whether the event bubbles up through the DOM tree true
cancelable boolean Whether the default action can be prevented via preventDefault() true
description string Short description of when and why the event fires Fired when a pointing device button is pressed and released on a single element.

Preview

First 10 records.

Data preview
namecategoryinterfacebubblescancelabledescription
abortresourceEventfalsefalseFired when a resource load has been aborted (e.g. the user cancelled it).
animationcancelanimationAnimationEventtruefalseFired when a CSS animation unexpectedly aborts, i.e. any time it stops running without sending an animationend event.
animationendanimationAnimationEventtruefalseFired when a CSS animation has completed one cycle.
animationiterationanimationAnimationEventtruefalseFired when an iteration of a CSS animation ends and a new iteration begins.
animationstartanimationAnimationEventtruefalseFired when a CSS animation has started.
auxclickmousePointerEventtruetrueFired when a non-primary pointer button (e.g. middle or right mouse button) has been pressed and released on an element.
beforeinputformInputEventtruetrueFired when the value of an input, select, or textarea element is about to be modified.
beforeunloadwindowBeforeUnloadEventfalsetrueFired when the window, the document and its resources are about to be unloaded. The document is still visible and the event is still cancelable.
blurfocusFocusEventfalsefalseFired when an element has lost focus. Unlike focusout, this event does not bubble.
canplaymediaEventfalsefalseFired when the browser can start playing the media, though it estimates not enough data has been loaded to play through to the end without buffering.

Showing 10 of 109. View full data:  JSON · CSV

Fetch examples

Drop-in snippets in five languages.

curl
curl -sSL https://staticdata.dev/v1/dom-events.json | jq '.[0]'
JavaScript
import type { DomEvent } from "https://staticdata.dev/v1/dom-events.ts";

const res = await fetch("https://staticdata.dev/v1/dom-events.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const domEvents: DomEvent[] = await res.json();
console.log(domEvents[0]);
Python
import urllib.request, json

with urllib.request.urlopen("https://staticdata.dev/v1/dom-events.min.json") as r:
    domEvents = json.load(r)

print(domEvents[0])
Go
package main

import (
	"encoding/json"
	"fmt"
	"net/http"
)

func main() {
	resp, err := http.Get("https://staticdata.dev/v1/dom-events.min.json")
	if err != nil { panic(err) }
	defer resp.Body.Close()

	var data []map[string]any
	if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
		panic(err)
	}
	fmt.Println(data[0])
}
Rust
use serde_json::Value;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let body = ureq::get("https://staticdata.dev/v1/dom-events.min.json").call()?.into_string()?;
    let data: Vec<Value> = serde_json::from_str(&body)?;
    println!("{:?}", data.first());
    Ok(())
}

Sources and methodology

This dataset covers 109 widely-used DOM events across all major event categories: mouse (click, dblclick, mousemove, mouseenter, mouseleave, etc.), keyboard (keydown, keyup, keypress), pointer (pointerdown, pointermove, pointerup, pointercancel), touch (touchstart, touchmove, touchend, touchcancel), form (input, change, submit, reset, focus, blur), drag (dragstart, drag, dragend, dragenter, dragleave, dragover, drop), media (play, pause, ended, timeupdate, volumechange, etc.), clipboard (copy, cut, paste), animation and transition (animationstart, transitionend, etc.), and window/document-level events (scroll, resize, load, DOMContentLoaded, visibilitychange, hashchange, popstate, storage, online, offline, beforeunload).

The bubbles flag indicates whether the event propagates upward through the DOM tree during the bubble phase; events that do not bubble (such as focus, blur, mouseenter, and mouseleave) can only be listened to on the target element itself or via the capture phase. The cancelable flag indicates whether calling event.preventDefault() can suppress the browser’s default behaviour for that event; non-cancelable events (such as scroll, load, and resize) will proceed with their default action regardless. The interface column names the specific Web API interface class whose instances are passed to event handlers, giving access to event-specific properties (for example, MouseEvent exposes clientX/clientY, while KeyboardEvent exposes key and code).

Events marked as deprecated (keypress, unload) are included for completeness and to document legacy codebases; MDN recommends replacing them with their modern equivalents (keydown/keyup and pagehide/visibilitychange respectively). Media events apply to HTMLVideoElement and HTMLAudioElement. Where an event’s flags depend on the target (e.g. scroll bubbles at the Document but not at elements; wheel and beforeinput are cancelable only in some cases) the most common case is recorded; bubbles, cancelable and interface values were cross-checked against the @webref/events extract of the specifications. Category values used in this dataset are: animation, clipboard, device, dom, drag, focus, form, keyboard, media, mouse, pointer, resource, touch, and window.

Versioning

URLs under /v1/ are stable: field names and types will not change in a way that breaks consumers. Values can be corrected or records added when the upstream source changes; schema-incompatible updates ship under a new version path. See the dom-events changelog for this dataset's history.

Related datasets

More Web datasets