event type descriptions are misleading #544
Unanswered
jonathanstanley
asked this question in
Content
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A few places in the docs on events / event listeners seem to confuse
Event
name andEvent.type
Example
click
triggers aMouseEvent
whereMouseEvent.type === "click"
click
is the Event typeMouseEvent
is the Event interface nameThis is WRONG on the events page:
The table header would indicate rows like
click
,mouseover
, etc.However, the rows instead show
MouseEvent
which is not the type (it's the Event interface name)Here is DOM spec for easy reference
Suggested fixes
1. rename table headers
they are currently wrong
on Events docs
2. clarify description
on addEventListener docs
3. enumerate the types
For example, the MouseEvent might look like this:
types:
click
,mouseover
,etc...
on Events docs
next
thoughts? would it be worth me submitting a PR?
Beta Was this translation helpful? Give feedback.
All reactions