Class: DetachedEvent

bcdui.widget. DetachedEvent

This class represents a DOM event which can be stored for later use, especially in a timeout function. It encapsulates the event functionality provided by prototype.js, but it is not destroyed when the event has finished. Instead it can be kept to invoke the event handler later.

A use case for this event object is for example a delayed tooltip appearing for example 200 ms after the mouse over event has occurred.

new bcdui.widget.DetachedEvent(event, element, endElement)

widget/detachedEvent.js, line 41
Name Type Description
event Event The event object that should be the base for this object.
element HtmlElement optional The source element of the event if it should not be derived from the provided event.
endElement HtmlElement optional The optional end element for the findAttribute method. No attribute on of an ancestor of this element is returned by findAttribute.

Methods

element(){HtmlElement}

widget/detachedEvent.js, line 90
Getter for the event origin element.
Returns:
Type Description
HtmlElement The element that caused the event.

findAttribute()

widget/detachedEvent.js, line 126
A convenience wrapper for bcdui.widget._findAttribute.

pointer(){Object}

widget/detachedEvent.js, line 100
Getter for the coordinates the event has been triggered at.
Returns:
Type Description
Object An object in the form { x: ##, y: ## } holding the x and y position where the event has been triggered.

pointerX(){integer}

widget/detachedEvent.js, line 109
Getter for the X coordinate of the event.
Returns:
Type Description
integer The X coordinate where the event has been triggered.

pointerY(){integer}

widget/detachedEvent.js, line 118
Getter for the Y coordinate of the event.
Returns:
Type Description
integer The Y coordinate where the event has been triggered.