mdn / mdn/browser-compat-data

The `error` and `load` events should be added to many interfaces

Open
#17,097 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

data:api
Dominant language
JSON
Stars
5.8k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
186

Description

While demixing the onerror and onload event handlers from the GlobalEventHandlers mixins, @foolip had mentioned there are many other interfaces the event should be placed on as well.

This (the string "error") is probably the most widely used event type, fired in lots of places. For this cleanup we only need to worry about the Node hierarchy and Window, however.

There's already an entry for Window, and these are the elements I can find where there's an "error" event:

  • HTMLImageElement
  • HTMLLinkElement
  • HTMLMediaElement (already in BCD)
  • HTMLObjectElement
  • HTMLScriptElement
  • HTMLSourceElement
  • HTMLStyleElement
  • HTMLTrackElement
  • SVGImageElement
  • SVGScriptElement
  • SVGStyleElement
  • SVGUseElement

Originally posted by @foolip in https://github.com/mdn/browser-compat-data/pull/16610#pullrequestreview-1028234821

I've opened this issue to remind us to research this later, so that the removal of GEH isn't blocked on this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing Window and HTMLMediaElement entries, then research the Node hierarchy and the interfaces listed in the issue. Done means the applicable error and load events are represented on the relevant interfaces without blocking removal of GlobalEventHandlers.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
data, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.