Class: DOMEvent

Guacamole.Event.DOMEvent(typenon-null, eventsopt)

new DOMEvent(typenon-null, eventsopt)

A Guacamole.Event that may relate to one or more DOM events. Continued propagation and default behavior of the related DOM events may be prevented with stopPropagation() and preventDefault() respectively.
Parameters:
Name Type Attributes Default Description
type string The unique name of this event type.
events Event | Array.<Event> <optional>
[] The DOM events that are related to this event, if any. Future calls to preventDefault() and stopPropagation() will affect these events.
Source:

Extends

Members

(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

(static) cancelEvent(eventnon-null)

Convenience function for cancelling all further processing of a given DOM event. Invoking this function prevents the default behavior of the event and stops any further propagation.
Parameters:
Name Type Description
event Event The DOM event to cancel.
Source:

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.
Source:

stopPropagation()

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