Class: Event

Guacamole.Mouse.Event(typenon-null, statenon-null, eventsopt)

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

Base event type for all mouse events. The mouse producing the event may be the user's local mouse (as with Guacamole.Mouse) or an emulated mouse (as with Guacamole.Mouse.Touchpad).
Parameters:
Name Type Attributes Default Description
type string The type name of the event ("mousedown", "mouseup", etc.)
state Guacamole.Mouse.State The current mouse state.
events Event | Array.<Event> <optional>
[] The DOM events that are related to this event, if any.
Source:

Extends

Classes

Target

Members

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

The current mouse state at the time this event was fired.
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.
Overrides:
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: