Class: Event

Guacamole.Touch.Event(typenon-null, eventnon-null, statenon-null)

new Event(typenon-null, eventnon-null, statenon-null)

An event which represents a change in state of a single touch contact, including the creation or removal of that contact. If multiple contacts are involved in a touch interaction, each contact will be associated with its own event.
Parameters:
Name Type Description
type string The name of the touch event type. Possible values are "touchstart", "touchmove", and "touchend".
event TouchEvent The DOM touch event that produced this Guacamole.Touch.Event.
state Guacamole.Touch.State The state of the touch contact associated with this event.
Source:

Extends

Members

(non-null) state :Guacamole.Touch.State

The state of the touch contact associated with this event.
Type:
Source:

(non-null) timestamp :number

An arbitrary timestamp in milliseconds, indicating this event's position in time relative to other events.
Type:
  • number
Inherited From:
Source:

(non-null) type :string

The unique name of this event type.
Type:
  • string
Inherited From:
Source:

Methods

getAge() → (non-null) {number}

Returns the number of milliseconds elapsed since this event was created.
Inherited From:
Source:
Returns:
The number of milliseconds elapsed since this event was created.
Type
number

invokeLegacyHandler(eventTargetnon-null)

Requests that the legacy event handler associated with this event be invoked on the given event target. This function will be invoked automatically by implementations of Guacamole.Event.Target whenever emit() is invoked.

Older versions of Guacamole relied on single event handlers with the prefix "on", such as "onmousedown" or "onkeyup". If a Guacamole.Event implementation is replacing the event previously represented by one of these handlers, this function gives the implementation the opportunity to provide backward compatibility with the old handler.

Unless overridden, this function does nothing.

Parameters:
Name Type Description
eventTarget Guacamole.Event.Target The Guacamole.Event.Target that emitted this event.
Inherited From:
Source:

preventDefault()

Requests that the default behavior of related DOM events be prevented. Whether this request will be honored by the browser depends on the nature of those events and the timing of the request.
Inherited From:
Source:

stopPropagation()

Stops further propagation of related events through the DOM. Only events that are directly related to this event will be stopped.
Inherited From:
Source: