Certain types such as MouseEvent.button not defined
See original GitHub issueI noticed some values for types such as MouseEvent.button
are defined in Web API specs but are not defined in lib.dom.ts
:
0: Main button pressed, usually the left button or the un-initialized state
1: Auxiliary button pressed, usually the wheel button or the middle button (if present)
2: Secondary button pressed, usually the right button
3: Fourth button, typically the Browser Back button
4: Fifth button, typically the Browser Forward button
If this is intentional, I’m wondering what the rationale is. (I could not find any similar issues or couldn’t find the right terms.)
terms: MouseEvent, button
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
MouseEvent.button - Web APIs | MDN
The MouseEvent.button read-only property indicates which button was pressed on the mouse to trigger the event.
Read more >Property MouseEvent.button doesn't work on mouseover event
I noticed that if the function is triggered by a mousedown event the value changes according to the pressed button.
Read more >How to Fix ReferenceError: Event is Not Defined in JavaScript
JavaScript's ReferenceError: Event is Not Defined occurs if the event parameter is not declared correctly when using an event handler.
Read more >MouseEvent (Java Platform SE 7 ) - Oracle Help Center
If the mouse event type has not been enabled on the component, ... Some extra mouse buttons are added to extend the standard...
Read more >UI Events - W3C
This specification defines several classes of conformance for ... Certain event targets (such as a link or button element) may have ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
They are not defined in the browsers (others like
WebSocket.CLOSED
are). So defining them would be an TypeScript only invention. I don’t think this would align to the mission of TypeScript.Closing because @saschanaz is one of the code-owners of this repository.