w3c / reffy

Reffy is a Web spec crawler and analyzer tool. It is notably used to update Webref
MIT License
71 stars 23 forks source link

Extract data on events #772

Closed dontcallmedom closed 2 years ago

dontcallmedom commented 3 years ago

See https://github.com/openwebdocs/project/issues/61#issuecomment-923172472 in the kind of data that would be useful to extract e.g. for MDN

dontcallmedom commented 3 years ago

some very rough check on which specs links to cancelable and bubbles:

webref/ed/links$ grep -l dom-event-cancelable  *
app-history.json
close-watcher.json
cookie-store.json
event-timing.json
html.json
IndexedDB-3.json
keyboard-map.json
notifications.json
pointerevents3.json
service-workers-1.json
uievents.json
xhr.json
webref/ed/links$ grep -l dom-event-bubbles  *
cookie-store.json
CSP3.json
fullscreen.json
html.json
IndexedDB-3.json
keyboard-map.json
picture-in-picture.json
pointerevents3.json
serial.json
uievents.json
web-bluetooth.json
xhr.json
dontcallmedom commented 3 years ago
The list of events that MDN asserts are cancelable
  • document/copy_event
  • document/cut_event
  • document/drag_event
  • document/dragenter_event
  • document/domcontentloaded_event
  • document/dragstart_event
  • document/dragover_event
  • document/drop_event
  • document/keypress_event
  • document/keyup_event
  • document/keydown_event
  • document/paste_event
  • document/pointerdown_event
  • document/pointermove_event
  • document/pointerover_event
  • document/pointerout_event
  • document/pointerup_event
  • document/selectstart_event
  • document/touchend_event
  • document/touchmove_event
  • document/touchstart_event
  • document/transitionend_event
  • document/wheel_event
  • element/auxclick_event
  • element/beforescriptexecute_event
  • element/click_event
  • element/compositionend_event
  • element/compositionstart_event
  • element/compositionupdate_event
  • element/contextmenu_event
  • element/copy_event
  • element/domactivate_event
  • element/dblclick_event
  • element/dommousescroll_event
  • element/keydown_event
  • element/keypress_event
  • element/keyup_event
  • element/mousedown_event
  • element/mousemove_event
  • element/mouseout_event
  • element/mouseover_event
  • element/mouseup_event
  • element/mousewheel_event
  • element/mozmousepixelscroll_event
  • element/paste_event
  • element/touchmove_event
  • element/cut_event
  • element/touchstart_event
  • element/wheel_event
  • htmlcanvaselement/webglcontextrestored_event
  • htmlcanvaselement/webglcontextlost_event
  • element/touchend_event
  • htmldialogelement/cancel_event
  • htmlelement/beforeinput_event
  • htmlcanvaselement/webglcontextcreationerror_event
  • htmlelement/pointerdown_event
  • htmlelement/pointermove_event
  • htmlelement/pointerout_event
  • htmlelement/pointerover_event
  • htmlelement/pointerup_event
  • htmlelement/transitionend_event
  • htmlformelement/reset_event
  • htmlformelement/submit_event
  • htmlinputelement/invalid_event
  • performance/resourcetimingbufferfull_event
  • svggraphicselement/copy_event
  • svggraphicselement/paste_event
  • svggraphicselement/cut_event
  • window/beforeunload_event
  • window/copy_event
  • window/cut_event
  • window/domcontentloaded_event
  • window/paste_event
  • window/transitionend_event
  • window/unhandledrejection_event
  • beforeunloadevent

(curtesy of rg -A1 "Cancelable" files/en-us/web/api/*/**event/index.md|grep "Yes" in a checkout of mdn/content)

The list of events that MDN asserts bubble
  • document/animationcancel_event
  • document/animationend_event
  • document/animationiteration_event
  • document/animationstart_event
  • document/copy_event
  • document/cut_event
  • document/dragend_event
  • document/dragenter_event
  • document/drag_event
  • document/dragleave_event
  • document/domcontentloaded_event
  • document/dragover_event
  • document/drop_event
  • document/dragstart_event
  • document/fullscreenchange_event
  • document/fullscreenerror_event
  • document/keypress_event
  • document/keydown_event
  • document/keyup_event
  • document/paste_event
  • document/pointercancel_event
  • document/pointerdown_event
  • document/pointerlockchange_event
  • document/pointerlockerror_event
  • document/pointermove_event
  • document/pointerout_event
  • document/pointerover_event
  • document/pointerup_event
  • document/scroll_event
  • document/selectstart_event
  • document/touchcancel_event
  • document/touchend_event
  • document/touchmove_event
  • document/touchstart_event
  • document/transitioncancel_event
  • document/transitionend_event
  • document/transitionrun_event
  • document/transitionstart_event
  • document/wheel_event
  • document/visibilitychange_event
  • element/afterscriptexecute_event
  • element/auxclick_event
  • element/beforescriptexecute_event
  • element/compositionend_event
  • element/click_event
  • element/compositionstart_event
  • element/compositionupdate_event
  • element/contextmenu_event
  • element/cut_event
  • element/copy_event
  • element/dblclick_event
  • element/domactivate_event
  • element/dommousescroll_event
  • element/focusin_event
  • element/focusout_event
  • element/fullscreenchange_event
  • element/fullscreenerror_event
  • element/keydown_event
  • element/keyup_event
  • element/keypress_event
  • element/mousedown_event
  • element/mousemove_event
  • element/mouseout_event
  • element/mouseover_event
  • element/mouseup_event
  • element/mousewheel_event
  • element/mozmousepixelscroll_event
  • element/paste_event
  • element/securitypolicyviolation_event
  • element/select_event
  • element/touchend_event
  • element/touchmove_event
  • element/touchstart_event
  • element/wheel_event
  • element/touchcancel_event
  • htmlcanvaselement/webglcontextcreationerror_event
  • htmlelement/animationcancel_event
  • htmlelement/animationend_event
  • htmlelement/animationiteration_event
  • htmlelement/animationstart_event
  • htmlelement/beforeinput_event
  • htmlelement/change_event
  • htmlelement/gotpointercapture_event
  • htmlelement/input_event
  • htmlelement/lostpointercapture_event
  • htmlelement/pointercancel_event
  • htmlelement/pointerdown_event
  • htmlelement/pointermove_event
  • htmlelement/pointerout_event
  • htmlelement/pointerover_event
  • htmlelement/pointerup_event
  • htmlelement/transitioncancel_event
  • htmlelement/transitionend_event
  • htmlelement/transitionrun_event
  • htmlelement/transitionstart_event
  • htmlformelement/reset_event
  • htmlformelement/submit_event
  • htmlinputelement/selectionchange_event
  • htmlslotelement/slotchange_event
  • htmltextareaelement/selectionchange_event
  • idbdatabase/abort_event
  • idbdatabase/error_event
  • idbrequest/error_event
  • idbtransaction/abort_event
  • idbtransaction/error_event
  • performance/resourcetimingbufferfull_event
  • rtcdatachannel/error_event
  • rtcdtlstransport/error_event
  • rtcpeerconnection/track_event
  • htmlinputelement/search_event
  • svgelement/error_event
  • svggraphicselement/copy_event
  • svggraphicselement/cut_event
  • svggraphicselement/paste_event
  • window/animationcancel_event
  • window/animationiteration_event
  • window/animationend_event
  • window/animationstart_event
  • window/copy_event
  • window/cut_event
  • window/domcontentloaded_event
  • window/hashchange_event
  • window/paste_event
  • window/transitioncancel_event
  • window/transitionend_event
  • window/transitionrun_event
  • window/transitionstart_event
  • xrsession/inputsourceschange_event
  • xrsession/selectend_event
  • xrreferencespace/reset_event
  • xrsession/selectstart_event
  • xrsession/squeezeend_event
  • xrsession/squeeze_event
  • xrsession/squeezestart_event
  • xrsession/visibilitychange_event
  • xrsession/select_event

(curtesy of rg -A1 "Bubbles" files/en-us/web/api/*/**event/index.md|grep "Yes" in a checkout of mdn/content)

dontcallmedom commented 3 years ago

filed https://github.com/mdn/content/pull/10006 while exploring cancelability of DOMContentLoaded

dontcallmedom commented 2 years ago

my exploration here focused on bubbles/cancelability; but a maybe simpler and maybe more directly useful extraction would be tie event handlers with the interface of the events they generate (see https://github.com/w3c/webref/issues/469). This may be possible by going through extracted definitions with the event type and their for scope, or through some less formally reliable heuristics.

foolip commented 2 years ago

I think this would be very useful. I'd see it as a list of event types (the event.type string) with the following information for each:

Because some event types like "error" are used a lot there would be repeated types. I would not suggest organizing this around event targets instead, because there are events that are arguably the same but just fire on multiple targets, and keeping them together retains that information. The "change" event fired at AudioTrackList or VideoTrackList is an example of this. https://html.spec.whatwg.org/#common-input-element-events has additional examples.

dontcallmedom commented 2 years ago
The list of events extracted from marked up definitions and the interfaces they're associated with
[
  {
    "type": "backgroundfetchsuccess",
    "interfaces": [
      "ServiceWorkerGlobalScope"
    ]
  },
  {
    "type": "backgroundfetchfail",
    "interfaces": [
      "ServiceWorkerGlobalScope"
    ]
  },
  {
    "type": "backgroundfetchabort",
    "interfaces": [
      "ServiceWorkerGlobalScope"
    ]
  },
  {
    "type": "backgroundfetchclick",
    "interfaces": [
      "ServiceWorkerGlobalScope"
    ]
  },
  {
    "type": "progress",
    "interfaces": [
      "BackgroundFetchRegistration"
    ]
  },
  {
    "type": "cancel",
    "interfaces": [
      "CloseWatcher"
    ]
  },
  {
    "type": "close",
    "interfaces": [
      "CloseWatcher"
    ]
  },
  {
    "type": "contentdelete",
    "interfaces": [
      "ServiceWorkerGlobalScope"
    ]
  },
  {
    "type": "animationstart",
    "interfaces": [
      "animationevent"
    ]
  },
  {
    "type": "animationend",
    "interfaces": [
      "animationevent"
    ]
  },
  {
    "type": "animationiteration",
    "interfaces": [
      "animationevent"
    ]
  },
  {
    "type": "animationcancel",
    "interfaces": [
      "animationevent"
    ]
  },
  {
    "type": "loading",
    "interfaces": [
      "FontFaceSet"
    ]
  },
  {
    "type": "loadingdone",
    "interfaces": [
      "FontFaceSet"
    ]
  },
  {
    "type": "loadingerror",
    "interfaces": [
      "FontFaceSet"
    ]
  },
  {
    "type": "navbeforefocus",
    "interfaces": [
      "NavigationEvent"
    ]
  },
  {
    "type": "navnotarget",
    "interfaces": [
      "NavigationEvent"
    ]
  },
  {
    "type": "change",
    "interfaces": [
      "MediaQueryList"
    ]
  },
  {
    "type": "resize",
    "interfaces": [
      "Window"
    ]
  },
  {
    "type": "scroll",
    "interfaces": [
      "Document",
      "Element"
    ]
  },
  {
    "type": "transitionrun",
    "interfaces": [
      "transitionevent"
    ]
  },
  {
    "type": "transitionstart",
    "interfaces": [
      "transitionevent"
    ]
  },
  {
    "type": "transitionend",
    "interfaces": [
      "transitionevent"
    ]
  },
  {
    "type": "transitioncancel",
    "interfaces": [
      "transitionevent"
    ]
  },
  {
    "type": "abort",
    "interfaces": [
      "AbortSignal"
    ]
  },
  {
    "type": "loadstart",
    "interfaces": [
      "FileReader"
    ]
  },
  {
    "type": "progress",
    "interfaces": [
      "FileReader"
    ]
  },
  {
    "type": "abort",
    "interfaces": [
      "FileReader"
    ]
  },
  {
    "type": "error",
    "interfaces": [
      "FileReader"
    ]
  },
  {
    "type": "load",
    "interfaces": [
      "FileReader"
    ]
  },
  {
    "type": "loadend",
    "interfaces": [
      "FileReader"
    ]
  },
  {
    "type": "fullscreenchange",
    "interfaces": [
      "Document",
      "Element"
    ]
  },
  {
    "type": "fullscreenerror",
    "interfaces": [
      "Document",
      "Element"
    ]
  },
  {
    "type": "gamepadconnected",
    "interfaces": []
  },
  {
    "type": "gamepaddisconnected",
    "interfaces": []
  },
  {
    "type": "loadstart",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "progress",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "suspend",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "abort",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "error",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "emptied",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "stalled",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "loadedmetadata",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "loadeddata",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "canplay",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "canplaythrough",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "playing",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "waiting",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "seeking",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "seeked",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "ended",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "durationchange",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "timeupdate",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "play",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "pause",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "ratechange",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "resize",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "volumechange",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "error",
    "interfaces": [
      "HTMLSourceElement"
    ]
  },
  {
    "type": "change",
    "interfaces": [
      "AudioTrackList",
      "VideoTrackList",
      "TextTrackList"
    ]
  },
  {
    "type": "addtrack",
    "interfaces": [
      "AudioTrackList",
      "VideoTrackList",
      "TextTrackList"
    ]
  },
  {
    "type": "removetrack",
    "interfaces": [
      "AudioTrackList",
      "VideoTrackList",
      "TextTrackList"
    ]
  },
  {
    "type": "cuechange",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "error",
    "interfaces": [
      "HTMLTrackElement"
    ]
  },
  {
    "type": "load",
    "interfaces": [
      "HTMLTrackElement"
    ]
  },
  {
    "type": "enter",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "exit",
    "interfaces": [
      "HTMLMediaElement"
    ]
  },
  {
    "type": "dragstart",
    "interfaces": [
      "GlobalEventHandlers"
    ]
  },
  {
    "type": "drag",
    "interfaces": [
      "GlobalEventHandlers"
    ]
  },
  {
    "type": "dragenter",
    "interfaces": [
      "GlobalEventHandlers"
    ]
  },
  {
    "type": "dragleave",
    "interfaces": [
      "GlobalEventHandlers"
    ]
  },
  {
    "type": "dragover",
    "interfaces": [
      "GlobalEventHandlers"
    ]
  },
  {
    "type": "drop",
    "interfaces": [
      "GlobalEventHandlers"
    ]
  },
  {
    "type": "dragend",
    "interfaces": [
      "GlobalEventHandlers"
    ]
  },
  {
    "type": "DOMContentLoaded",
    "interfaces": [
      "Document"
    ]
  },
  {
    "type": "afterprint",
    "interfaces": [
      "Window"
    ]
  },
  {
    "type": "beforeprint",
    "interfaces": [
      "Window"
    ]
  },
  {
    "type": "beforematch",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "beforeunload",
    "interfaces": [
      "Window"
    ]
  },
  {
    "type": "blur",
    "interfaces": [
      "Window",
      "HTMLElement"
    ]
  },
  {
    "type": "cancel",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "change",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "close",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "connect",
    "interfaces": [
      "SharedWorkerGlobalScope"
    ]
  },
  {
    "type": "contextlost",
    "interfaces": [
      "HTMLElement",
      "OffscreenCanvas"
    ]
  },
  {
    "type": "contextrestored",
    "interfaces": [
      "HTMLElement",
      "OffscreenCanvas"
    ]
  },
  {
    "type": "copy",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "cut",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "error",
    "interfaces": [
      "Window",
      "WorkerGlobalScope",
      "HTMLElement",
      "EventSource",
      "Worker",
      "SharedWorker",
      "AbstractWorker"
    ]
  },
  {
    "type": "focus",
    "interfaces": [
      "Window",
      "HTMLElement"
    ]
  },
  {
    "type": "formdata",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "hashchange",
    "interfaces": [
      "Window"
    ]
  },
  {
    "type": "input",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "invalid",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "languagechange",
    "interfaces": [
      "Window",
      "WorkerGlobalScope"
    ]
  },
  {
    "type": "load",
    "interfaces": [
      "Window",
      "HTMLElement"
    ]
  },
  {
    "type": "message",
    "interfaces": [
      "Window",
      "EventSource",
      "MessagePort",
      "BroadcastChannel",
      "DedicatedWorkerGlobalScope",
      "Worker",
      "ServiceWorkerContainer"
    ]
  },
  {
    "type": "messageerror",
    "interfaces": [
      "Window",
      "MessagePort",
      "BroadcastChannel",
      "DedicatedWorkerGlobalScope",
      "Worker",
      "ServiceWorkerContainer"
    ]
  },
  {
    "type": "offline",
    "interfaces": [
      "Window",
      "WorkerGlobalScope"
    ]
  },
  {
    "type": "online",
    "interfaces": [
      "Window",
      "WorkerGlobalScope"
    ]
  },
  {
    "type": "open",
    "interfaces": [
      "EventSource"
    ]
  },
  {
    "type": "pagehide",
    "interfaces": [
      "Window"
    ]
  },
  {
    "type": "pageshow",
    "interfaces": [
      "Window"
    ]
  },
  {
    "type": "paste",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "popstate",
    "interfaces": [
      "Window"
    ]
  },
  {
    "type": "readystatechange",
    "interfaces": [
      "Document"
    ]
  },
  {
    "type": "rejectionhandled",
    "interfaces": [
      "Window",
      "WorkerGlobalScope"
    ]
  },
  {
    "type": "reset",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "securitypolicyviolation",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "select",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "slotchange",
    "interfaces": [
      "HTMLSlotElement"
    ]
  },
  {
    "type": "storage",
    "interfaces": [
      "Window"
    ]
  },
  {
    "type": "submit",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "toggle",
    "interfaces": [
      "HTMLElement"
    ]
  },
  {
    "type": "unhandledrejection",
    "interfaces": [
      "Window",
      "WorkerGlobalScope"
    ]
  },
  {
    "type": "unload",
    "interfaces": [
      "Window"
    ]
  },
  {
    "type": "visibilitychange",
    "interfaces": [
      "Document"
    ]
  },
  {
    "type": "versionchange",
    "interfaces": [
      "connection"
    ]
  },
  {
    "type": "complete",
    "interfaces": [
      "transaction"
    ]
  },
  {
    "type": "abort",
    "interfaces": [
      "transaction"
    ]
  },
  {
    "type": "success",
    "interfaces": [
      "request"
    ]
  },
  {
    "type": "error",
    "interfaces": [
      "request"
    ]
  },
  {
    "type": "blocked",
    "interfaces": [
      "request"
    ]
  },
  {
    "type": "upgradeneeded",
    "interfaces": [
      "request"
    ]
  },
  {
    "type": "reflectionchange",
    "interfaces": [
      "XRLightProbe"
    ]
  },
  {
    "type": "appinstalled",
    "interfaces": []
  },
  {
    "type": "beforeinstallprompt",
    "interfaces": []
  },
  {
    "type": "addtrack",
    "interfaces": []
  },
  {
    "type": "removetrack",
    "interfaces": []
  },
  {
    "type": "mute",
    "interfaces": []
  },
  {
    "type": "unmute",
    "interfaces": []
  },
  {
    "type": "ended",
    "interfaces": []
  },
  {
    "type": "devicechange",
    "interfaces": []
  },
  {
    "type": "start",
    "interfaces": [
      "MediaRecorder"
    ]
  },
  {
    "type": "stop",
    "interfaces": [
      "MediaRecorder"
    ]
  },
  {
    "type": "dataavailable",
    "interfaces": [
      "MediaRecorder"
    ]
  },
  {
    "type": "pause",
    "interfaces": [
      "MediaRecorder"
    ]
  },
  {
    "type": "resume",
    "interfaces": [
      "MediaRecorder"
    ]
  },
  {
    "type": "error",
    "interfaces": [
      "MediaRecorder"
    ]
  },
  {
    "type": "navigate",
    "interfaces": [
      "Navigation"
    ]
  },
  {
    "type": "navigatesuccess",
    "interfaces": [
      "Navigation"
    ]
  },
  {
    "type": "navigateerror",
    "interfaces": [
      "Navigation"
    ]
  },
  {
    "type": "currententrychange",
    "interfaces": [
      "Navigation"
    ]
  },
  {
    "type": "dispose",
    "interfaces": [
      "NavigationHistoryEntry"
    ]
  },
  {
    "type": "enterpictureinpicture",
    "interfaces": [
      "HTMLVideoElement"
    ]
  },
  {
    "type": "leavepictureinpicture",
    "interfaces": [
      "HTMLVideoElement"
    ]
  },
  {
    "type": "resize",
    "interfaces": [
      "PictureInPictureWindow"
    ]
  },
  {
    "type": "message",
    "interfaces": [
      "HTMLPortalElement"
    ]
  },
  {
    "type": "messageerror",
    "interfaces": [
      "HTMLPortalElement"
    ]
  },
  {
    "type": "message",
    "interfaces": [
      "PortalHost"
    ]
  },
  {
    "type": "messageerror",
    "interfaces": [
      "PortalHost"
    ]
  },
  {
    "type": "portalactivate",
    "interfaces": [
      "Window"
    ]
  },
  {
    "type": "prioritychange",
    "interfaces": [
      "TaskSignal"
    ]
  },
  {
    "type": "statechange",
    "interfaces": [
      "ServiceWorker"
    ]
  },
  {
    "type": "updatefound",
    "interfaces": [
      "ServiceWorkerRegistration"
    ]
  },
  {
    "type": "controllerchange",
    "interfaces": [
      "ServiceWorkerContainer"
    ]
  },
  {
    "type": "message",
    "interfaces": [
      "ServiceWorkerContainer"
    ]
  },
  {
    "type": "messageerror",
    "interfaces": [
      "ServiceWorkerContainer"
    ]
  },
  {
    "type": "install",
    "interfaces": [
      "ServiceWorkerGlobalScope"
    ]
  },
  {
    "type": "activate",
    "interfaces": [
      "ServiceWorkerGlobalScope"
    ]
  },
  {
    "type": "fetch",
    "interfaces": [
      "ServiceWorkerGlobalScope"
    ]
  },
  {
    "type": "message",
    "interfaces": [
      "ServiceWorkerGlobalScope"
    ]
  },
  {
    "type": "messageerror",
    "interfaces": [
      "ServiceWorkerGlobalScope"
    ]
  },
  {
    "type": "audiostart",
    "interfaces": [
      "SpeechRecognition"
    ]
  },
  {
    "type": "soundstart",
    "interfaces": [
      "SpeechRecognition"
    ]
  },
  {
    "type": "speechstart",
    "interfaces": [
      "SpeechRecognition"
    ]
  },
  {
    "type": "speechend",
    "interfaces": [
      "SpeechRecognition"
    ]
  },
  {
    "type": "soundend",
    "interfaces": [
      "SpeechRecognition"
    ]
  },
  {
    "type": "audioend",
    "interfaces": [
      "SpeechRecognition"
    ]
  },
  {
    "type": "result",
    "interfaces": [
      "SpeechRecognition"
    ]
  },
  {
    "type": "nomatch",
    "interfaces": [
      "SpeechRecognition"
    ]
  },
  {
    "type": "error",
    "interfaces": [
      "SpeechRecognition"
    ]
  },
  {
    "type": "start",
    "interfaces": [
      "SpeechRecognition"
    ]
  },
  {
    "type": "end",
    "interfaces": [
      "SpeechRecognition"
    ]
  },
  {
    "type": "voiceschanged",
    "interfaces": [
      "SpeechSynthesis"
    ]
  },
  {
    "type": "start",
    "interfaces": [
      "SpeechSynthesisUtterance"
    ]
  },
  {
    "type": "end",
    "interfaces": [
      "SpeechSynthesisUtterance"
    ]
  },
  {
    "type": "error",
    "interfaces": [
      "SpeechSynthesisUtterance"
    ]
  },
  {
    "type": "pause",
    "interfaces": [
      "SpeechSynthesisUtterance"
    ]
  },
  {
    "type": "resume",
    "interfaces": [
      "SpeechSynthesisUtterance"
    ]
  },
  {
    "type": "mark",
    "interfaces": [
      "SpeechSynthesisUtterance"
    ]
  },
  {
    "type": "boundary",
    "interfaces": [
      "SpeechSynthesisUtterance"
    ]
  },
  {
    "type": "touchstart",
    "interfaces": []
  },
  {
    "type": "touchend",
    "interfaces": []
  },
  {
    "type": "touchmove",
    "interfaces": []
  },
  {
    "type": "touchcancel",
    "interfaces": []
  },
  {
    "type": "advertisementreceived",
    "interfaces": [
      "BluetoothDevice"
    ]
  },
  {
    "type": "availabilitychanged",
    "interfaces": [
      "Bluetooth"
    ]
  },
  {
    "type": "characteristicvaluechanged",
    "interfaces": [
      "BluetoothRemoteGATTCharacteristic"
    ]
  },
  {
    "type": "gattserverdisconnected",
    "interfaces": [
      "BluetoothDevice"
    ]
  },
  {
    "type": "serviceadded",
    "interfaces": [
      "BluetoothRemoteGATTService"
    ]
  },
  {
    "type": "servicechanged",
    "interfaces": [
      "BluetoothRemoteGATTService"
    ]
  },
  {
    "type": "serviceremoved",
    "interfaces": [
      "BluetoothRemoteGATTService"
    ]
  },
  {
    "type": "change",
    "interfaces": [
      "ImageTrack"
    ]
  },
  {
    "type": "uncapturederror",
    "interfaces": [
      "GPUDevice"
    ]
  },
  {
    "type": "open",
    "interfaces": [
      "RTCDataChannel"
    ]
  },
  {
    "type": "message",
    "interfaces": [
      "RTCDataChannel"
    ]
  },
  {
    "type": "bufferedamountlow",
    "interfaces": [
      "RTCDataChannel"
    ]
  },
  {
    "type": "error",
    "interfaces": [
      "RTCDataChannel"
    ]
  },
  {
    "type": "closing",
    "interfaces": [
      "RTCDataChannel"
    ]
  },
  {
    "type": "close",
    "interfaces": [
      "RTCDataChannel"
    ]
  },
  {
    "type": "track",
    "interfaces": [
      "RTCPeerConnection"
    ]
  },
  {
    "type": "negotiationneeded",
    "interfaces": [
      "RTCPeerConnection"
    ]
  },
  {
    "type": "signalingstatechange",
    "interfaces": [
      "RTCPeerConnection"
    ]
  },
  {
    "type": "iceconnectionstatechange",
    "interfaces": [
      "RTCPeerConnection"
    ]
  },
  {
    "type": "icegatheringstatechange",
    "interfaces": [
      "RTCPeerConnection"
    ]
  },
  {
    "type": "icecandidate",
    "interfaces": [
      "RTCPeerConnection"
    ]
  },
  {
    "type": "connectionstatechange",
    "interfaces": [
      "RTCPeerConnection"
    ]
  },
  {
    "type": "icecandidateerror",
    "interfaces": [
      "RTCPeerConnection"
    ]
  },
  {
    "type": "datachannel",
    "interfaces": [
      "RTCPeerConnection"
    ]
  },
  {
    "type": "tonechange",
    "interfaces": [
      "RTCDTMFSender"
    ]
  },
  {
    "type": "statechange",
    "interfaces": [
      "RTCIceTransport"
    ]
  },
  {
    "type": "gatheringstatechange",
    "interfaces": [
      "RTCIceTransport"
    ]
  },
  {
    "type": "selectedcandidatepairchange",
    "interfaces": [
      "RTCIceTransport"
    ]
  },
  {
    "type": "statechange",
    "interfaces": [
      "RTCDtlsTransport"
    ]
  },
  {
    "type": "error",
    "interfaces": [
      "RTCDtlsTransport"
    ]
  },
  {
    "type": "statechange",
    "interfaces": [
      "RTCSctpTransport"
    ]
  },
  {
    "type": "open",
    "interfaces": [
      "WebSocket"
    ]
  },
  {
    "type": "message",
    "interfaces": [
      "WebSocket"
    ]
  },
  {
    "type": "error",
    "interfaces": [
      "WebSocket"
    ]
  },
  {
    "type": "close",
    "interfaces": [
      "WebSocket"
    ]
  },
  {
    "type": "devicechange",
    "interfaces": [
      "XRSystem"
    ]
  },
  {
    "type": "visibilitychange",
    "interfaces": [
      "XRSession"
    ]
  },
  {
    "type": "end",
    "interfaces": [
      "XRSession"
    ]
  },
  {
    "type": "inputsourceschange",
    "interfaces": [
      "XRSession"
    ]
  },
  {
    "type": "selectstart",
    "interfaces": [
      "XRSession"
    ]
  },
  {
    "type": "selectend",
    "interfaces": [
      "XRSession"
    ]
  },
  {
    "type": "select",
    "interfaces": [
      "XRSession"
    ]
  },
  {
    "type": "squeezestart",
    "interfaces": [
      "XRSession"
    ]
  },
  {
    "type": "squeezeend",
    "interfaces": [
      "XRSession"
    ]
  },
  {
    "type": "squeeze",
    "interfaces": [
      "XRSession"
    ]
  },
  {
    "type": "frameratechange",
    "interfaces": [
      "XRSession"
    ]
  },
  {
    "type": "reset",
    "interfaces": [
      "XRReferenceSpace"
    ]
  },
  {
    "type": "redraw",
    "interfaces": [
      "XRLayer"
    ]
  },
  {
    "type": "reflectionchange",
    "interfaces": [
      "XRLightProbe"
    ]
  },
  {
    "type": "change",
    "interfaces": [
      "Screen"
    ]
  },
  {
    "type": "screenschange",
    "interfaces": [
      "ScreenDetails"
    ]
  },
  {
    "type": "currentscreenchange",
    "interfaces": [
      "ScreenDetails"
    ]
  },
  {
    "type": "change",
    "interfaces": [
      "ScreenDetailed"
    ]
  },
  {
    "type": "readystatechange",
    "interfaces": [
      "XMLHttpRequest"
    ]
  },
  {
    "type": "loadstart",
    "interfaces": [
      "XMLHttpRequest"
    ]
  },
  {
    "type": "progress",
    "interfaces": [
      "XMLHttpRequest"
    ]
  },
  {
    "type": "abort",
    "interfaces": [
      "XMLHttpRequest"
    ]
  },
  {
    "type": "error",
    "interfaces": [
      "XMLHttpRequest"
    ]
  },
  {
    "type": "load",
    "interfaces": [
      "XMLHttpRequest"
    ]
  },
  {
    "type": "timeout",
    "interfaces": [
      "XMLHttpRequest"
    ]
  },
  {
    "type": "loadend",
    "interfaces": [
      "XMLHttpRequest"
    ]
  }
]

via jq -s '[.[].dfns[]|select(.type == "event")|{type: .linkingText[0], interfaces: .for}]' *.json in ed/dfns

That's 269 events, when MDN has 433 event pages.

list of events missing from reffy extraction
  • animation/cancel
  • animation/finish
  • animation/remove
  • audioscheduledsourcenode/ended
  • audioworkletnode/processorerror
  • baseaudiocontext/statechange
  • batterymanager/chargingchange
  • batterymanager/chargingtimechange
  • batterymanager/dischargingtimechange
  • batterymanager/levelchange
  • cookiestore/change
  • document/afterscriptexecute
  • document/animationcancel
  • document/animationend
  • document/animationiteration
  • document/animationstart
  • document/beforescriptexecute
  • document/copy
  • document/cut
  • document/drag
  • document/dragend
  • document/dragenter
  • document/dragleave
  • document/dragover
  • document/dragstart
  • document/drop
  • document/gotpointercapture
  • document/keydown
  • document/keypress
  • document/keyup
  • document/lostpointercapture
  • document/paste
  • document/pointercancel
  • document/pointerdown
  • document/pointerenter
  • document/pointerleave
  • document/pointerlockchange
  • document/pointerlockerror
  • document/pointermove
  • document/pointerout
  • document/pointerover
  • document/pointerup
  • document/selectionchange
  • document/selectstart
  • document/touchcancel
  • document/touchend
  • document/touchmove
  • document/touchstart
  • document/transitioncancel
  • document/transitionend
  • document/transitionrun
  • document/transitionstart
  • document/wheel
  • element/afterscriptexecute
  • element/auxclick
  • element/beforescriptexecute
  • element/blur
  • element/click
  • element/compositionend
  • element/compositionstart
  • element/compositionupdate
  • element/contextmenu
  • element/copy
  • element/cut
  • element/dblclick
  • element/domactivate
  • element/dommousescroll
  • element/error
  • element/focus
  • element/focusin
  • element/focusout
  • element/gesturechange
  • element/gestureend
  • element/gesturestart
  • element/keydown
  • element/keypress
  • element/keyup
  • element/mousedown
  • element/mouseenter
  • element/mouseleave
  • element/mousemove
  • element/mouseout
  • element/mouseover
  • element/mouseup
  • element/mousewheel
  • element/mozmousepixelscroll
  • element/mscontentzoom
  • element/msgesturechange
  • element/msgestureend
  • element/msgesturehold
  • element/msgesturestart
  • element/msgesturetap
  • element/msinertiastart
  • element/msmanipulationstatechanged
  • element/paste
  • element/securitypolicyviolation
  • element/select
  • element/show
  • element/touchcancel
  • element/touchend
  • element/touchmove
  • element/touchstart
  • element/webkitmouseforcechanged
  • element/webkitmouseforcedown
  • element/webkitmouseforceup
  • element/webkitmouseforcewillbegin
  • element/wheel
  • focusevent/focusevent
  • hiddevice/inputreport
  • htmlcanvaselement/webglcontextcreationerror
  • htmlcanvaselement/webglcontextlost
  • htmlcanvaselement/webglcontextrestored
  • htmldetailselement/toggle
  • htmldialogelement/cancel
  • htmldialogelement/close
  • htmlelement/animationcancel
  • htmlelement/animationend
  • htmlelement/animationiteration
  • htmlelement/animationstart
  • htmlelement/beforeinput
  • htmlelement/gotpointercapture
  • htmlelement/lostpointercapture
  • htmlelement/pointercancel
  • htmlelement/pointerdown
  • htmlelement/pointerenter
  • htmlelement/pointerleave
  • htmlelement/pointermove
  • htmlelement/pointerout
  • htmlelement/pointerover
  • htmlelement/pointerup
  • htmlelement/transitioncancel
  • htmlelement/transitionend
  • htmlelement/transitionrun
  • htmlelement/transitionstart
  • htmlformelement/formdata
  • htmlformelement/reset
  • htmlformelement/submit
  • htmlinputelement/invalid
  • htmlinputelement/search
  • htmlinputelement/selectionchange
  • htmltextareaelement/selectionchange
  • htmltrackelement/cuechange
  • idbdatabase/close
  • idbdatabase/versionchange
  • idbfilehandle/abort
  • idbfilehandle/complete
  • idbfilehandle/error
  • idbfilerequest/progress
  • idbmutablefile/abort
  • idbmutablefile/error
  • idbopendbrequest/blocked
  • idbopendbrequest/upgradeneeded
  • idbrequest/error
  • idbrequest/success
  • idbtransaction/abort
  • idbtransaction/complete
  • idbtransaction/error
  • idledetector/change
  • mediadevices/devicechange
  • mediakeysession/keystatuseschange
  • mediakeysession/message
  • mediarecorder/warning
  • mediastream/addtrack
  • mediastream/removetrack
  • mediastreamtrack/ended
  • mediastreamtrack/mute
  • mediastreamtrack/overconstrained
  • mediastreamtrack/unmute
  • messagechannel/messagechannel
  • midiaccess/statechange
  • midiinput/midimessage
  • midiport/statechange
  • ndefreader/reading
  • ndefreader/readingerror
  • networkinformation/change
  • notification/click
  • notification/close
  • notification/error
  • notification/show
  • offlineaudiocontext/complete
  • paymentrequest/merchantvalidation
  • paymentrequest/paymentmethodchange
  • paymentrequest/shippingaddresschange
  • paymentrequest/shippingoptionchange
  • paymentresponse/payerdetailchange
  • performance/resourcetimingbufferfull
  • permissionstatus/change
  • remoteplayback/connect
  • remoteplayback/connecting
  • remoteplayback/disconnect
  • rtcpeerconnection/addstream
  • rtcpeerconnection/removestream
  • screen/orientationchange
  • scriptprocessornode/audioprocess
  • sensor/activate
  • sensor/error
  • sensor/reading
  • serialport/connect
  • serialport/disconnect
  • serviceworkercontainer/error
  • serviceworker/error
  • serviceworkerglobalscope/notificationclick
  • serviceworkerglobalscope/notificationclose
  • serviceworkerglobalscope/periodicsync
  • serviceworkerglobalscope/push
  • serviceworkerglobalscope/pushsubscriptionchange
  • serviceworkerglobalscope/sync
  • speechrecognition/speechrecognition
  • svganimationelement/beginevent
  • svganimationelement/endevent
  • svganimationelement/repeatevent
  • svgelement/error
  • svgelement/load
  • svggraphicselement/copy
  • svggraphicselement/cut
  • svggraphicselement/paste
  • texttrack/cuechange
  • texttrackcue/enter
  • texttrackcue/exit
  • usb/connect
  • usb/disconnect
  • visualviewport/resize
  • visualviewport/scroll
  • wakelocksentinel/release
  • window/animationcancel
  • window/animationend
  • window/animationiteration
  • window/animationstart
  • window/appinstalled
  • window/beforeinstallprompt
  • windowcontrolsoverlay/geometrychange
  • window/copy
  • window/cut
  • window/devicemotion
  • window/deviceorientation
  • window/deviceorientationabsolute
  • window/domcontentloaded
  • window/gamepadconnected
  • window/gamepaddisconnected
  • window/orientationchange
  • window/paste
  • window/transitioncancel
  • window/transitionend
  • window/transitionrun
  • window/transitionstart
  • window/vrdisplayactivate
  • window/vrdisplayblur
  • window/vrdisplayconnect
  • window/vrdisplaydeactivate
  • window/vrdisplaydisconnect
  • window/vrdisplayfocus
  • window/vrdisplaypointerrestricted
  • window/vrdisplaypointerunrestricted
  • window/vrdisplaypresentchange
  • xrcubelayer/redraw
  • xrcylinderlayer/redraw
  • xrequirectlayer/redraw
  • xrquadlayer/redraw
list of events missing from MDN events pages
  • abstractworker/error
  • animationevent/animationcancel
  • animationevent/animationend
  • animationevent/animationiteration
  • animationevent/animationstart
  • bluetoothdevice/advertisementreceived
  • bluetoothdevice/gattserverdisconnected
  • bluetoothremotegattcharacteristic/characteristicvaluechanged
  • bluetoothremotegattservice/serviceadded
  • bluetoothremotegattservice/servicechanged
  • bluetoothremotegattservice/serviceremoved
  • closewatcher/cancel
  • closewatcher/close
  • connection/versionchange
  • globaleventhandlers/drag
  • globaleventhandlers/dragend
  • globaleventhandlers/dragenter
  • globaleventhandlers/dragleave
  • globaleventhandlers/dragover
  • globaleventhandlers/dragstart
  • globaleventhandlers/drop
  • gpudevice/uncapturederror
  • htmlelement/beforematch
  • htmlelement/blur
  • htmlelement/cancel
  • htmlelement/close
  • htmlelement/contextlost
  • htmlelement/contextrestored
  • htmlelement/error
  • htmlelement/focus
  • htmlelement/formdata
  • htmlelement/invalid
  • htmlelement/load
  • htmlelement/reset
  • htmlelement/securitypolicyviolation
  • htmlelement/select
  • htmlelement/submit
  • htmlelement/toggle
  • htmlmediaelement/cuechange
  • htmlmediaelement/enter
  • htmlmediaelement/exit
  • htmlmediaelement/resize
  • htmlportalelement/message
  • htmlportalelement/messageerror
  • htmlsourceelement/error
  • htmltrackelement/error
  • htmltrackelement/load
  • imagetrack/change
  • navigation/currententrychange
  • navigationevent/navbeforefocus
  • navigationevent/navnotarget
  • navigationhistoryentry/dispose
  • navigation/navigate
  • navigation/navigateerror
  • navigation/navigatesuccess
  • offscreencanvas/contextlost
  • offscreencanvas/contextrestored
  • portalhost/message
  • portalhost/messageerror
  • request/blocked
  • request/error
  • request/success
  • request/upgradeneeded
  • rtcdtlstransport/statechange
  • rtcsctptransport/statechange
  • screen/change
  • screendetailed/change
  • screendetails/currentscreenchange
  • screendetails/screenschange
  • serviceworkercontainer/message
  • serviceworkercontainer/messageerror
  • serviceworkercontainer/messageerror
  • serviceworkerglobalscope/backgroundfetchabort
  • serviceworkerglobalscope/backgroundfetchclick
  • serviceworkerglobalscope/backgroundfetchfail
  • serviceworkerglobalscope/backgroundfetchsuccess
  • serviceworkerglobalscope/messageerror
  • tasksignal/prioritychange
  • transaction/abort
  • transaction/complete
  • transitionevent/transitioncancel
  • transitionevent/transitionend
  • transitionevent/transitionrun
  • transitionevent/transitionstart
  • window/portalactivate
  • workerglobalscope/error
  • workerglobalscope/languagechange
  • workerglobalscope/offline
  • workerglobalscope/online
  • workerglobalscope/rejectionhandled
  • workerglobalscope/unhandledrejection
  • xrlayer/redraw
  • xrlightprobe/reflectionchange
  • xrsession/frameratechange

From a quick look, the diffs are a mix of actual gaps and badly marked up specs.

In terms of associating events with the interface of the object they produce, the naive heuristic tying foo and FooEvent only generates 55 such associations, which I haven't verified the validity of.

Associating `foo` with `FooEvent`
  • BackgroundFetchRegistration/progress might be associated with ProgressEvent
  • CloseWatcher/close might be associated with CloseEvent
  • FileReader/progress might be associated with ProgressEvent
  • FileReader/error might be associated with ErrorEvent
  • HTMLMediaElement/progress might be associated with ProgressEvent
  • HTMLMediaElement/error might be associated with ErrorEvent
  • HTMLSourceElement/error might be associated with ErrorEvent
  • HTMLTrackElement/error might be associated with ErrorEvent
  • GlobalEventHandlers/drag might be associated with DragEvent
  • Window/beforeunload might be associated with BeforeUnloadEvent
  • HTMLElement/close might be associated with CloseEvent
  • Window/error might be associated with ErrorEvent
  • WorkerGlobalScope/error might be associated with ErrorEvent
  • HTMLElement/error might be associated with ErrorEvent
  • EventSource/error might be associated with ErrorEvent
  • Worker/error might be associated with ErrorEvent
  • SharedWorker/error might be associated with ErrorEvent
  • AbstractWorker/error might be associated with ErrorEvent
  • Window/focus might be associated with FocusEvent
  • HTMLElement/focus might be associated with FocusEvent
  • HTMLElement/formdata might be associated with FormDataEvent
  • Window/hashchange might be associated with HashChangeEvent
  • HTMLElement/input might be associated with InputEvent
  • Window/message might be associated with MessageEvent
  • EventSource/message might be associated with MessageEvent
  • MessagePort/message might be associated with MessageEvent
  • BroadcastChannel/message might be associated with MessageEvent
  • DedicatedWorkerGlobalScope/message might be associated with MessageEvent
  • Worker/message might be associated with MessageEvent
  • ServiceWorkerContainer/message might be associated with MessageEvent
  • Window/popstate might be associated with PopStateEvent
  • HTMLElement/securitypolicyviolation might be associated with SecurityPolicyViolationEvent
  • Window/storage might be associated with StorageEvent
  • HTMLElement/submit might be associated with SubmitEvent
  • request/error might be associated with ErrorEvent
  • MediaRecorder/error might be associated with ErrorEvent
  • Navigation/navigate might be associated with NavigateEvent
  • HTMLPortalElement/message might be associated with MessageEvent
  • PortalHost/message might be associated with MessageEvent
  • Window/portalactivate might be associated with PortalActivateEvent
  • ServiceWorkerContainer/message might be associated with MessageEvent
  • ServiceWorkerGlobalScope/fetch might be associated with FetchEvent
  • ServiceWorkerGlobalScope/message might be associated with MessageEvent
  • SpeechRecognition/error might be associated with ErrorEvent
  • SpeechSynthesisUtterance/error might be associated with ErrorEvent
  • RTCDataChannel/message might be associated with MessageEvent
  • RTCDataChannel/error might be associated with ErrorEvent
  • RTCDataChannel/close might be associated with CloseEvent
  • RTCPeerConnection/track might be associated with TrackEvent
  • RTCDtlsTransport/error might be associated with ErrorEvent
  • WebSocket/message might be associated with MessageEvent
  • WebSocket/error might be associated with ErrorEvent
  • WebSocket/close might be associated with CloseEvent
  • XMLHttpRequest/progress might be associated with ProgressEvent
  • XMLHttpRequest/error might be associated with ErrorEvent

A few specs (notably the HTML spec) have tables associating event types with event interfaces; not sure yet how easy they would be to parse generically, nor how much coverage this would bring.

The DOM spec suggests using the phrase "Fire an event named X using Y"; some specs are doing it, but again, not sure how many. I guess further exploration will require playing with a reffy module.

dontcallmedom commented 2 years ago

the naive heuristic tying foo and FooEvent only generates 55 such associations

(that being said, there are "only" 106 Event interfaces defined across 59 specifications)

Specs and the number of event interfaces they define
  • 14 https://www.w3.org/TR/uievents/
  • 12 https://html.spec.whatwg.org/multipage/
  • 6 https://www.w3.org/TR/webrtc/
  • 4 https://www.w3.org/TR/webxr/
  • 4 https://wicg.github.io/speech-api/
  • 3 https://www.w3.org/TR/webaudio/
  • 3 https://www.w3.org/TR/service-workers-1/
  • 3 https://www.w3.org/TR/edit-context/
  • 2 https://www.w3.org/TR/webrtc-encoded-transform/
  • 2 https://www.w3.org/TR/webmidi/
  • 2 https://www.w3.org/TR/push-api/
  • 2 https://www.w3.org/TR/presentation-api/
  • 2 https://www.w3.org/TR/payment-request/
  • 2 https://www.w3.org/TR/payment-handler/
  • 2 https://www.w3.org/TR/orientation-event/
  • 2 https://www.w3.org/TR/mediastream-recording/
  • 2 https://www.w3.org/TR/encrypted-media/
  • 2 https://www.w3.org/TR/cssom-view-1/
  • 2 https://wicg.github.io/webhid/
  • 2 https://wicg.github.io/navigation-api/
  • 2 https://wicg.github.io/cookie-store/
  • 2 https://wicg.github.io/background-fetch/
  • 2 https://webbluetoothcg.github.io/web-bluetooth/
  • 2 https://dom.spec.whatwg.org/
  • 1 https://xhr.spec.whatwg.org/
  • 1 https://www.w3.org/TR/webxrlayers-1/
  • 1 https://www.w3.org/TR/webgpu/
  • 1 https://www.w3.org/TR/touch-events/
  • 1 https://www.w3.org/TR/pointerlock-2/
  • 1 https://www.w3.org/TR/pointerevents3/
  • 1 https://www.w3.org/TR/picture-in-picture/
  • 1 https://www.w3.org/TR/mediacapture-streams/
  • 1 https://www.w3.org/TR/input-events-2/
  • 1 https://www.w3.org/TR/IndexedDB-3/
  • 1 https://www.w3.org/TR/generic-sensor/
  • 1 https://www.w3.org/TR/gamepad/
  • 1 https://www.w3.org/TR/css-transitions-1/
  • 1 https://www.w3.org/TR/css-nav-1/
  • 1 https://www.w3.org/TR/css-font-loading-3/
  • 1 https://www.w3.org/TR/css-animations-1/
  • 1 https://www.w3.org/TR/CSP3/
  • 1 https://www.w3.org/TR/clipboard-apis/
  • 1 https://www.khronos.org/registry/webgl/specs/latest/1.0/
  • 1 https://wicg.github.io/window-controls-overlay/
  • 1 https://wicg.github.io/webusb/
  • 1 https://wicg.github.io/scheduling-apis/
  • 1 https://wicg.github.io/portals/
  • 1 https://wicg.github.io/periodic-background-sync/
  • 1 https://wicg.github.io/manifest-incubations/
  • 1 https://wicg.github.io/input-device-capabilities/
  • 1 https://wicg.github.io/content-index/spec/
  • 1 https://wicg.github.io/background-sync/spec/
  • 1 https://websockets.spec.whatwg.org/
  • 1 https://w3c.github.io/web-nfc/
  • 1 https://w3c.github.io/mediacapture-handle/identity/
  • 1 https://w3c.github.io/mediacapture-handle/actions/
  • 1 https://svgwg.org/specs/animations/
  • 1 https://notifications.spec.whatwg.org/
  • 1 https://drafts.csswg.org/web-animations-2/
via cat ed/idlnames/*Event.idl|grep " Source"|cut -d "(" -f 2|sort|uniq -c|sort -rn|sed -e "s/^/
  • /"|sed -e "s/)$//"
  • dontcallmedom commented 2 years ago

    952 is exploring how much information can be automatically extracted from specs today. Quoting the current status report:

    The current version of this PR extracts 435 events from 81 specifications, with event type, the interface the event is sent with, and the interfaces that the event targets.

    Unfortunately, for 68 of these specifications, the extracted information is incomplete, primarily in its ability to detect the interface of the event object. I believe the patterns that the extractor detects could be applied to all of these specs to correct these gaps, but this is not an insignificant effort.

    It may be that a bit more of heuristics would reduce that number a bit, but I still expect it would require a non insignificant amount of patches to specs.

    I would be game to be part of a shared effort in that direction (as well a giving the actual directions for the kind of patches needed), but I would need to know who else would be willing to contribute, and what additional information we would want to extract (if any) before going through such an exercise.

    dontcallmedom commented 2 years ago

    The current version of this PR extracts 435 events from 81 specifications, with event type, the interface the event is sent with, and the interfaces that the event targets. Unfortunately, for 68 of these specifications, the extracted information is incomplete, primarily in its ability to detect the interface of the event object. I believe the patterns that the extractor detects could be applied to all of these specs to correct these gaps, but this is not an insignificant effort.

    My error detection script was bogus (!) and I improved a bit the extraction code; the number of specifications with incomplete data is down to 50, and I've filed patches for 2 of them.

    dontcallmedom commented 2 years ago

    @foolip I'd be interested in your views on:

    foolip commented 2 years ago

    what's the minimally viable dataset for events? Would name + interface + targets be good enough as a starting point?

    I think I'd add bubbling to that, since that determines whether document.addEventListener(type, callback) makes sense for a lot of events fired on elements. It's tempting to add cancelable + composed to the list, but I don't think those are as important in practice.

    would you be game to work with @tidoust and I on patching events-defining specs to make more of them automatically extractable? the instructions for that are still to-be-written, but it's essentially either using the DOM phrasing of "fire an event named X using Y", or using an event summary table as a few specs are already doing.

    Yes, I could send some spec patches, if we have a burndown list.