Class: UiElement

vef.ui.UiElement(target, events, position)

Base class for Ui Elements. Creates a container and can be added to the DOM

Constructor

new UiElement(target, events, position)

Create the element and optionally append it to a target element. {@code target} can be an "#id" with or without a hash in the beginning or an instance of HTMLElement. Creates a
-Element as a container inside {@code this.element_}
Parameters:
Name Type Description
target string/HTMLElement id or HTMLElement (optional)
events Object events for the EventObject (optional)
position string | HTMLElement (optional, default=beforeend) beforebegin, afterbegin, beforeend, afterend
Author:
Source:

Methods

appendTo(target, position)

Append the sidebar to a target element. {@code target} can be an "#id" with with or without a hash in the beginning or an instance of HTMLElement.
Parameters:
Name Type Description
target string | HTMLElement id or HTMLElement
position string | HTMLElement (optional, default=beforeend) beforebegin, afterbegin, beforeend, afterend
Source:

dispose()

Remove the UiElement from the DOM and clean up the memory if necessary for garbage collection override this method if further cleanup is required.
Source:

getElement() → {HTMLElement}

Get the Ui Element container
Source:
Returns:
element
Type
HTMLElement

query(selector)

Apply a querySelector on the element
Parameters:
Name Type Description
selector string
Source:

queryAll(selector)

Apply a querySelectorAll on the element
Parameters:
Name Type Description
selector string
Source:

removeClass(classes)

Remove the classnames from the main element
Parameters:
Name Type Description
classes Array.<string>
Source:

scroll()

scroll the parent to this elements location
Source:

setClass(classes)

Set the classnames of the main element
Parameters:
Name Type Description
classes Array.<string>
Source:

setHtml(html)

Set the innerHTML content of the main element
Parameters:
Name Type Description
html string
Source: