A wrapper around an HTML element.
Only to be used in Javascript code.
ZUT.DomElement |
$el
@file
|
|
|
NEW(el) @file |
|
$getParent()
ZUT.Element @public | Get the parent Element
|
|
$getChildren()
list<ZUT.Element> @public | Get the list of child Elements.
|
|
$getValue()
string @public | Get the value of the DOM element.
|
|
$setValue(text) @public | Set the value of the DOM element.
|
|
$getText()
string @public | Get the text content of the DOM element.
|
|
$setText(text) @public | Set the text content of the DOM element.
|
|
$getAttribute(name)
string @public | Return the attribute value of the DOM element.
|
|
$getClasses()
string @public | Return the class attribute value of the DOM element.
|
|
$setClasses(classes) @public | Sets the class attribute value of the DOM element to classes.
|
|
$hasClass(class)
bool @public | Returns TRUE if the class property of the Element contains class.
|
|
$addClass(class) @public | Add class to the class property, if it wasn't there yet.
|
|
$removeClass(class) @public | Remove class from the class property, if it wa there.
|
|
$setDisplay(display) @public | Set the display attribute.
|
|
$setDisabled(disabled) @public | Set the disabled attribute of a button.
|
|
$setStyle(name, value) @public | Set style attribute name to string value.
|
|
$setStyle(name, value) @public | Set style attribute name to number value.
|
|
$setBackgroundColor(r, g, b) @public | Set the background-color style attribute to the r, g and b
values.
|
|
$getWidth()
int @public | Return the width of this Element.
|
|
$getHeight()
int @public | Return the height of this Element.
|
|
$getTop()
int @public | Return the vertical position of this Element in the page
|
|
$getTop(container)
int @public | Return the vertical position of this Element within container
|
|
$getLeft()
int @public | Return the horizontal position of this Element in the page
|
|
$getLeft(container)
int @public | Return the horizontal position of this Element within container
|
|
$getHorizontalScroll()
int @public | Get the current horizontal scroll position in pixels.
|
|
$setHorizontalScroll(pixels) @public | Set the horizontal scroll position to pixels.
|
|
$scrollLeft() @public | Scroll horizontally to the far left.
|
|
$scrollRight() @public | Scroll horizontally to the far right.
|
|
$getVerticalScroll()
int @public | Get the current vertical scroll position in pixels.
|
|
$setVerticalScroll(pixels) @public | Set the vertical scroll position to pixels.
|
|
$scrollTop() @public | Scroll vertically to the top.
|
|
$scrollBottom() @public | Scroll vertically to the bottom.
|
|
$ensureVisible(element) @public | Ensure that element is visible by scrolling horizontally and/or
vertically.
|
|
$ensureVisibleVertical(element) @public | Ensure that element is visible by scrolling vertically only.
|
|
$ensureVisibleHorizontal(element) @public | Ensure that element is visible by scrolling horizontally only.
|
|
$fireEvent(type, key) @public | Fire an event on the element.
|
|
$addListener(listener) @file | Add a listener to the Element.
|
|
$hasListener()
bool @file | Return TRUE if this element has any listeners.
|
|
$triggerListeners(info) @file | Trigger all listeners, passing info.
|
|
$fill(template) @public | Fill the element with the result of template.
|
|
$removeFromDom() @public | Remove this element from the DOM.
|
|