Skip to content

Commit

Permalink
Add UI Events (#2285)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
  • Loading branch information
autonome and ddbeck authored Nov 29, 2024
1 parent f553280 commit 936ec29
Show file tree
Hide file tree
Showing 14 changed files with 576 additions and 30 deletions.
10 changes: 10 additions & 0 deletions features/composition-events.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Composition events
description: The `compositionstart`, `compositionupdate`, and `compositionend` events fire when an input method editor adds characters that might not be commonly available on keyboards. Examples of these characters are emoji, logograms in Asian languages, or input from speech recognition processors.
spec: https://w3c.github.io/uievents/#events-compositionevents
compat_features:
- api.CompositionEvent
- api.CompositionEvent.CompositionEvent
- api.CompositionEvent.data
- api.Element.compositionend_event
- api.Element.compositionstart_event
- api.Element.compositionupdate_event
58 changes: 58 additions & 0 deletions features/composition-events.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Generated from: composition-events.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: high
baseline_low_date: 2017-04-19
baseline_high_date: 2019-10-19
support:
chrome: "26"
chrome_android: "26"
edge: "12"
firefox: "53"
firefox_android: "53"
safari: "7"
safari_ios: "7"
compat_features:
# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "15"
# chrome_android: "18"
# edge: "12"
# firefox: "9"
# firefox_android: "9"
# safari: "5"
# safari_ios: "5"
- api.CompositionEvent
- api.CompositionEvent.data
- api.Element.compositionend_event
- api.Element.compositionstart_event

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "18"
# chrome_android: "18"
# edge: "12"
# firefox: "9"
# firefox_android: "9"
# safari: "5"
# safari_ios: "5"
- api.Element.compositionupdate_event

# ⬇️ Same status as overall feature ⬇️
# baseline: high
# baseline_low_date: 2017-04-19
# baseline_high_date: 2019-10-19
# support:
# chrome: "26"
# chrome_android: "26"
# edge: "12"
# firefox: "53"
# firefox_android: "53"
# safari: "7"
# safari_ios: "7"
- api.CompositionEvent.CompositionEvent
18 changes: 18 additions & 0 deletions features/focus-events.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Focus events
description: Focus events, such as `focus` and `blur`, fire when an element gets or loses focus.
spec: https://w3c.github.io/uievents/#events-focusevent
compute_from:
- api.Element.blur_event
- api.Element.focus_event
# It's possible that caniuse's `focusin-focusout-events` could be linked here
# or broken out into a separate feature. But caniuse and BCD conflict,
# making this difficult. See this issue to help resolve this:
# https://github.com/web-platform-dx/web-features/issues/2327
compat_features:
- api.Element.blur_event
- api.Element.focus_event
- api.Element.focusin_event
- api.Element.focusout_event
- api.FocusEvent
- api.FocusEvent.FocusEvent
- api.FocusEvent.relatedTarget
56 changes: 56 additions & 0 deletions features/focus-events.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Generated from: focus-events.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
safari: "7"
safari_ios: "7"
compat_features:
# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "1"
# chrome_android: "18"
# edge: "12"
# firefox: "6"
# firefox_android: "6"
# safari: "3.1"
# safari_ios: "2"
- api.Element.blur_event

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "1"
# chrome_android: "18"
# edge: "12"
# firefox: "24"
# firefox_android: "24"
# safari: "3.1"
# safari_ios: "2"
- api.Element.focus_event

# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "26"
# chrome_android: "26"
# edge: "12"
# firefox: "24"
# firefox_android: "24"
# safari: "7"
# safari_ios: "7"
- api.FocusEvent
- api.FocusEvent.FocusEvent
- api.FocusEvent.relatedTarget

# baseline: false
# support:
# safari: "5"
# safari_ios: "4.2"
- api.Element.focusin_event
- api.Element.focusout_event
15 changes: 14 additions & 1 deletion features/input-event.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
name: input (event)
name: Input events
description: The `input` event fires when a form control changes or an element with the `contenteditable` attribute changes.
spec: https://w3c.github.io/uievents/#event-type-input
caniuse: input-event
status:
compute_from: api.Element.input_event
compat_features:
- api.Element.beforeinput_event
- api.Element.input_event
- api.InputEvent
- api.InputEvent.InputEvent
- api.InputEvent.inputType
- api.InputEvent.data
- api.InputEvent.dataTransfer
- api.InputEvent.getTargetRanges
- api.InputEvent.inputType.insertFromPasteAsQuotation
- api.InputEvent.isComposing
25 changes: 17 additions & 8 deletions features/input-event.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: low
baseline_low_date: 2023-03-27
baseline: high
baseline_low_date: 2020-01-15
baseline_high_date: 2022-07-15
support:
chrome: "60"
chrome_android: "60"
chrome: "1"
chrome_android: "18"
edge: "79"
firefox: "87"
firefox_android: "87"
safari: "16.4"
safari_ios: "16.4"
firefox: "6"
firefox_android: "6"
safari: "3.1"
safari_ios: "2"
compat_features:
# ⬇️ Same status as overall feature ⬇️
# baseline: high
# baseline_low_date: 2020-01-15
# baseline_high_date: 2022-07-15
Expand Down Expand Up @@ -78,6 +80,7 @@ compat_features:
# firefox_android: "87"
# safari: "10.1"
# safari_ios: "10.3"
- api.Element.beforeinput_event
- api.InputEvent.getTargetRanges

# baseline: low
Expand All @@ -91,3 +94,9 @@ compat_features:
# safari: "16.4"
# safari_ios: "16.4"
- api.InputEvent.isComposing

# baseline: false
# support:
# firefox: "67"
# firefox_android: "67"
- api.InputEvent.inputType.insertFromPasteAsQuotation
35 changes: 35 additions & 0 deletions features/keyboard-events.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Keyboard events
description: The `keydown` and `keyup` events fire for each key press (or, with modifier keys, a combination of key presses) on a keyboard.
spec: https://w3c.github.io/uievents/#events-keyboardevents
status:
compute_from:
- api.Element.keydown_event
- api.Element.keyup_event
compat_features:
- api.Element.keydown_event
- api.Element.keyup_event
- api.KeyboardEvent
- api.KeyboardEvent.KeyboardEvent
- api.KeyboardEvent.altKey
- api.KeyboardEvent.code
- api.KeyboardEvent.ctrlKey
- api.KeyboardEvent.getModifierState
- api.KeyboardEvent.getModifierState.key_parameter_alt
- api.KeyboardEvent.getModifierState.key_parameter_altgraph
- api.KeyboardEvent.getModifierState.key_parameter_capslock
- api.KeyboardEvent.getModifierState.key_parameter_control
- api.KeyboardEvent.getModifierState.key_parameter_fn
- api.KeyboardEvent.getModifierState.key_parameter_meta
- api.KeyboardEvent.getModifierState.key_parameter_numlock
- api.KeyboardEvent.getModifierState.key_parameter_scrolllock
- api.KeyboardEvent.getModifierState.key_parameter_shift
- api.KeyboardEvent.getModifierState.key_parameter_symbol
- api.KeyboardEvent.isComposing
- api.KeyboardEvent.key
- api.KeyboardEvent.key.dead_key
- api.KeyboardEvent.key.non_printable_keys
- api.KeyboardEvent.key.printable_key
- api.KeyboardEvent.location
- api.KeyboardEvent.metaKey
- api.KeyboardEvent.repeat
- api.KeyboardEvent.shiftKey
Loading

0 comments on commit 936ec29

Please sign in to comment.