mdn/content

Misleading sentence in dispatchEvent() page

Geschlossen

#43.519 geöffnet am 22.03.2026

 (7 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Markdown (23.184 Forks)batch import
Content:WebAPIgood first issue

Repository-Metriken

Stars
 (10.905 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 7T 3h) (147 gemergte PRs in 30 T)

Beschreibung

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/dispatchEvent

What specific section or headline is this issue about?

Unlike "native" events, which are fired by the browser and invoke event handlers asynchronously via the event loop,

What information was incorrect, unhelpful, or incomplete?

I think this sentence:

Unlike "native" events, which are fired by the browser and invoke event handlers asynchronously via the event loop

Is misleading.

AFAIK, Native events puts "dispatchEvent" calls on the event loop. Once those are called, the rest is still synchronous, meaning: the event handling itself run synchronously, including checking for registered event handlers and running them - synchronously.

The way that sentence is phrased, could be interpreted as though the event handler functions themselves run "asynchronously" - or are put on the Event Loop - but they are registered/saved on the element implementing EventTarget - and run "from there".

What did you expect to see?

Maybe: Unlike "native" events, which are fired by the browser and invoke dispatchEvent asynchronously via the [event loop]

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

Contributor Guide