Expand all

abstract UiElement

Represents a UI element.

Constructor

new UiElement($container)abstract #

Parameters:

Name Type Description
$container jQuery
Source:

Properties

$container #

Properties:

Name Type Description
$container jQuery

The element that contains the UI element.

Source:

eventsRegistered #

Properties:

Name Type Description
eventsRegistered Object.<string, Array.<string>>

Events that this element has registered with the DOM.

Source:

Methods

attach()abstract #

Registers listeners.

Source:
Registers listeners.

clearEvents() #

Remove all events that have been registered on this element.

TODO: Unit tests

Source:
Remove all events that have been registered on this element.

empty()abstract #

Empties the element.

Source:
Empties the element.

handleEvent(name, handler) #

Add event handler in a way that will be auto-cleared on lightbox close

TODO: Unit tests

Parameters:

Name Type Description
name string

Name of event, like 'keydown'

handler function

Callback for the event

Source:

Add event handler in a way that will be auto-cleared on lightbox close

TODO: Unit tests

set()abstract #

Sets the data for the element.

Source:
Sets the data for the element.

unattach()abstract #

Clears listeners.

Source:
Clears listeners.