Interface TouchEventTarget

All Superinterfaces:
EventTarget, org.teavm.jso.JSObject
All Known Subinterfaces:
SVGElement, WindowEventTarget
All Known Implementing Classes:
HTMLAnchorElement, HTMLAudioElement, HTMLBaseElement, HTMLBodyElement, HTMLButtonElement, HTMLCanvasElement, HTMLElement, HTMLFormElement, HTMLHeadElement, HTMLHtmlElement, HTMLIFrameElement, HTMLImageElement, HTMLInputElement, HTMLLinkElement, HTMLMediaElement, HTMLMetaElement, HTMLOptionElement, HTMLScriptElement, HTMLSelectElement, HTMLSourceElement, HTMLTextAreaElement, HTMLTitleElement, HTMLVideoElement, Window

public interface TouchEventTarget extends EventTarget
  • Method Details

    • onTouchStart

      default Registration onTouchStart(EventListener<TouchEvent> listener)
      The touchstart event is fired when one or more touch points are placed on the touch surface.
    • onTouchEnd

      default Registration onTouchEnd(EventListener<TouchEvent> listener)
      The touchend event fires when one or more touch points are removed from the touch surface. Remember that it is possible to get a touchcancel event instead.
    • onTouchCancel

      default Registration onTouchCancel(EventListener<TouchEvent> listener)

      The touchcancel event is fired when one or more touch points have been disrupted in an implementation-specific manner.

      Some examples of situations that will trigger a touchcancel event:

      • A hardware event occurs that cancels the touch activities. This may include, for example, the user switching applications using an application switcher interface or the "home" button on a mobile device.
      • The device's screen orientation is changed while the touch is active.
      • The browser decides that the user started touch input accidentally. This can happen if, for example, the hardware supports palm rejection to prevent a hand resting on the display while using a stylus from accidentally triggering events.
      • The touch-action CSS property prevents the input from continuing. When the user interacts with too many fingers simultaneously, the browser can fire this event for all existing pointers (even if the user is still touching the screen).
    • onTouchMove

      default Registration onTouchMove(EventListener<TouchEvent> listener)
      The touchmove event is fired when one or more touch points are moved along the touch surface.