Safari Developer Library

Developer

Touch Class Reference

Options
Deployment Target:

On This Page

Touch

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable Not Applicable

Availability


Available in iOS 2.0 and later.

The Touch class represents a single touch on the surface. A touch is the presence or movement of a finger that is part of a unique multi-touch sequence. Use the changedTouches method to get all the touch objects that changed in a TouchEvent object.

  • clientX Property

    The x-coordinate of the touch’s location relative to the window’s viewport.

    Declaration

    JavaScript

    readonly attribute long clientX

    Availability

    Available in iOS 2.0 and later.

  • clientY Property

    The y-coordinate of the touch’s location relative to the window’s viewport.

    Declaration

    JavaScript

    readonly attribute long clientY

    Availability

    Available in iOS 2.0 and later.

  • identifier Property

    The unique identifier for this touch object.

    Declaration

    JavaScript

    readonly attribute unsigned long identifier

    Availability

    Available in iOS 2.0 and later.

  • pageX Property

    The x-coordinate of the touch’s location in page coordinates.

    Declaration

    JavaScript

    readonly attribute long pageX

    Availability

    Available in iOS 2.0 and later.

  • pageY Property

    The y-coordinate of the touch’s location in page coordinates.

    Declaration

    JavaScript

    readonly attribute long pageY

    Availability

    Available in iOS 2.0 and later.

  • screenX Property

    The x-coordinate of the touch’s location in screen coordinates.

    Declaration

    JavaScript

    readonly attribute long screenX

    Availability

    Available in iOS 2.0 and later.

  • screenY Property

    The y-coordinate of the touch’s location in screen coordinates.

    Declaration

    JavaScript

    readonly attribute long screenY

    Availability

    Available in iOS 2.0 and later.

  • target Property

    The target of this touch.

    Declaration

    JavaScript

    readonly attribute EventTarget target

    Availability

    Available in iOS 2.0 and later.