public
Description: A tiny web GUI toolkit for JavaScript, inspired by Shoes
Home | Edit | New

Elements

Methods

Traversal

getContents() array Returns the child elements of an element.
getParent() Element | Slot Returns the parent element of an element.
getApp() App Returns the app that the element belongs to.
remove() this Removes an element.

Dimension

getOffsetWidth() number Returns the outer width (width + padding + border) of an element.
getOffsetHeight() number Returns the outer height (height + padding + border) of an element.
getClientWidth() number Returns the inner width (width + padding – gutter) of an element.
getClientHeight() number Returns the inner width (width + padding – gutter) of an element.
getScrollWidth() number Returns the total scrollable inner width (scrollable width + padding – gutter) of an element.
getScrollHeight() number Returns the total scrollable inner height (scrollable height + padding – gutter) of an element.
getGutterRight() number Returns the width of the vertical scrollbar of an element.
getGutterBottom() number Returns the height of the horizontal scrollbar of an element.

Position

getScrollLeft() number Returns the amount which an element is scrolled horizontally.
getScrollTop() number Returns the amount which an element is scrolled vertically.
getScrollLeftMax() number Returns the maximum amount which an element can be scrolled horizontally.
getScrollTopMax() number Returns the maximum amount which an element can be scrolled vertically.
setScrollLeft(number scrollLeft) number Sets the amount which an element is scrolled horizontally.
setScrollTop(number scrollTop) number Sets the amount which an element is scrolled vertically.
isScrollable() boolean Returns whether an element is made scrollable.
move(number left, number top) this Moves an element to specific coordinates with respect to the top left coordinate of the parent element, affecting the surrounding layout. (Absolute positioning)
displace(number left, number top) this Moves an element to specific coordinates with respect to the element’s original location without affecting the surrounding layout. (Relative positioning)

Style

getStyle() object Returns the style of an element. See also: Styles
setStyle(object style) this Sets the style of an element. See also: Styles
show() this Reveals an element if it is hidden, affecting the surrounding layout. Same as setStyle({hidden:false}).
hide() this Hides an element if it is revealed, affecting the surrounding layout. Same as setStyle({hidden:false}).
toggle() this Reveals or hides an element.
visible() this Makes an element visible if it is invisible, without affecting the surrounding layout. Same as setStyle({invisible:false}).
invisible() this Makes an element invisible if it is visible, without affecting the surrounding layout. Same as setStyle({invisible:true}).
toggleVisibility() this Toggles visibility of an element.
getTooltip() string Returns the tooltip (mouse-over text).
setTooltip(string tooltip) this Sets the tooltip (mouse-over text).

DOM attributes

getId() string Returns the id attribute of an element.
setId() this Sets the id attribute of an element.
getClassNames() array Returns the class attributes of an element.
setClassName(string className) this Sets the class attribute of an element.
addClassName(string className) this Adds a class attribute to an element.
removeClassName(string className) this Removes a class attribute to an element.

Events

See Events.

Last edited by petejkim, Fri Apr 24 05:00:49 -0700 2009
Home | Edit | New
Versions: