Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. UIEvent
  4. sourceCapabilities

UIEvent: sourceCapabilities property

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

ThesourceCapabilities read-only property of theUIEvent interface returnsan instance of theInputDeviceCapabilities interface which providesinformation about the physical device responsible for generating a touch event. If noinput device was responsible for the event, it returnsnull.

When a single user interaction with an input device generates a series of differentinput events, thesourceCapabilities property for all of them will point tothe same instance ofInputDeviceCapabilities. For example, when a userlifts their finger off of a touchscreen, several UIEvents may be generated includingtouchend,mousedown,click, andfocus. All of these events must have the samesourceCapabilities representing the touchscreen.

A device is considered "responsible" for an event only when that interaction is part ofthe abstraction provided by the web platform. For example, many user agents allow awindow to be resized with a mouse or a keyboard, but this detail is not exposed to theweb platform in any way, and so the sourceCapabilities of a resize event will typicallybe null.

Value

An instance ofInputDeviceCapabilities.

Specifications

Specification
Input Device Capabilities
# dom-uievent-sourcecapabilities

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp