≪ Today I learned. RSS購読
公開日
タグ
JavaScript
著者
ダーシノ(@bc_rikko)

Mouse Event、Touch Event、Pointer Event の違い

Mouse Event

[Event] <|-- [UIEvent] <|-- [MouseEvent]

https://developer.mozilla.org/ja/docs/Web/API/MouseEvent

Touch Event

[Event] <|-- [UIEvent] <|-- [TouchEvent]

https://developer.mozilla.org/ja/docs/Web/API/TouchEvent

Pointer Event

[Event] <|-- [UIEvent] <|-- [MouseEvent] <|-- [PointerEvent]

https://developer.mozilla.org/ja/docs/Web/API/PointerEvent

まとめ

とりあえずPointer Eventを使っておけば良さそう。