Class: TimezoneList

TimezoneList(menu)

new TimezoneList(menu)

Class responsible for managing timezone list interaction with user.
Parameters:
Name Type Description
menu Menu World Clock menu component.
Source:
Throws:
if any timezone list component is missing in the DOM.
Type
WorldClockError

Members

Allows to access World Clock menu component.
Source:

Methods

(private) _findListElementOfTypeBeforeThisElement(element, type) → {HTMLLIElement}

Recursively find element of specified type in the list before the provided one.
Parameters:
Name Type Description
element HTMLLIElement list element
type String one of the values from ["group", "region", "city"]
Source:
Returns:
provided or founded element.
Type
HTMLLIElement

(private) _on_click(e)

Handles user click on one of the timezone list elements.
Parameters:
Name Type Description
e MouseEvent mouse event object.
Source:

(private) _populateList()

Populates the list from all available timezones. Builds HTML for each of different TimezoneObject part using TemplateBuilder.
Source:

(private) _scrollToTop()

Scrolls timezone list to the top.
Source:

filterTimezonesByUserInput(userInput)

Filter timezone list elements by user input, which defines the name of TimezoneObject.
Parameters:
Name Type Description
userInput String string value of user input.
Source: