Skip to content

Commit

Permalink
Create a mouse-events feature
Browse files Browse the repository at this point in the history
This is an old feature, but created to capture
`api.MouseEvent.movement{X,Y}` that, until this commit, were under the
`pointer-lock` feature. The properties work independently of pointer
lock, so it makes sense for them to live somewhere else.

This was prompted by mdn/content#34263.
  • Loading branch information
ddbeck committed Jun 19, 2024
1 parent 46ccd76 commit 7bb6a04
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
39 changes: 39 additions & 0 deletions features/mouse-events.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Mouse events
description: Mouse events, such as `click`, `mousedown`, or `mousemove`, fire when users interact with a pointing device such a mouse or trackpad.
spec: https://w3c.github.io/uievents/#events-mouse-types
compat_features:
# TODO: compute_from list
- api.Element.click_event
- api.Element.dblclick_event
- api.Element.mousedown_event
- api.Element.mouseup_event
- api.Element.mousemove_event
- api.Element.mouseout_event
- api.Element.mouseover_event
- api.MouseEvent
- api.MouseEvent.altKey
- api.MouseEvent.button
- api.MouseEvent.clientX
- api.MouseEvent.clientY
- api.MouseEvent.ctrlKey
- api.MouseEvent.metaKey
- api.MouseEvent.pageX
- api.MouseEvent.pageY
- api.MouseEvent.relatedTarget
- api.MouseEvent.screenX
- api.MouseEvent.screenY
- api.MouseEvent.shiftKey

# TODO: later additions
# - api.Element.mouseenter_event
# - api.Element.mouseleave_event
# - api.MouseEvent.MouseEvent
# - api.MouseEvent.buttons
# - api.MouseEvent.getModifierState
# - api.MouseEvent.offsetX
# - api.MouseEvent.offsetY
# - api.MouseEvent.x
# - api.MouseEvent.y
# Note that the next two were specified with `pointer-lock`, but work independently of it.
# - api.MouseEvent.movementX
# - api.MouseEvent.movementY
15 changes: 15 additions & 0 deletions features/mouse-events.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Generated from: mouse-events.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: high
baseline_low_date: 2015-07-29
baseline_high_date: 2018-01-29
support:
chrome: "2"
chrome_android: "18"
edge: "12"
firefox: "6"
firefox_android: "6"
safari: "4"
safari_ios: "3.2"
2 changes: 0 additions & 2 deletions features/pointer-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ compat_features:
- api.Document.pointerLockElement
- api.Document.pointerlockerror_event
- api.Element.requestPointerLock
- api.MouseEvent.movementX
- api.MouseEvent.movementY
# Later additions:
# - api.ShadowRoot.pointerLockElement
# - html.elements.iframe.sandbox.allow-pointer-lock

0 comments on commit 7bb6a04

Please sign in to comment.