| Package: | YAHOO.util |
| Class: | Element |
| Extends: | Object |
| Subclasses: | Tab, TabView |
| Defined In: | tabview.js |
| Property | Defined By | |
|---|---|---|
| DOM_EVENTS : Object | Element | |
| Dom events supported by the Element instance. | ||
| Method | Defined By | |
|---|---|---|
Element(el {HTMLElement/String}, Object map) |
Element | |
addClass(String className) : void |
Element | |
| Wrapper for Dom method. | ||
addListener(String type, Function fn, Any obj, Object scope) : void |
Element | |
| Adds a listener for the given event. These may be DOM or customEvent listeners. Any event that is fired via fireEve... | ||
appendChild(Boolean deep) : void |
Element | |
| Wrapper for HTMLElement method. | ||
appendTo(HTMLElement/Element parentNode, HTMLElement/Element before) : void |
Element | |
| Appends the HTMLElement into either the supplied parentNode. | ||
| fireQueue() : void | Element | |
| Apply any queued set calls. | ||
getElementsByClassName(String className, [String tag]) : Array |
Element | |
| Wrapper for Dom method. | ||
getElementsByTagName(String tag) : void |
Element | |
| Wrapper for HTMLElement method. | ||
getStyle(String property) : String |
Element | |
| Wrapper for Dom method. | ||
| hasChildNodes() : Boolean | Element | |
| Wrapper for HTMLElement method. | ||
hasClass(String className) : Boolean |
Element | |
| Wrapper for Dom method. | ||
initAttributes(Object map) : void |
Element | |
| Registers Element specific attributes. | ||
insertBefore(HTMLElement element, HTMLElement before) : void |
Element | |
| Wrapper for HTMLElement method. | ||
on(String type, Function fn, Any obj, Object scope) : void |
Element | |
| Alias for addListener | ||
removeChild(HTMLElement child) : void |
Element | |
| Wrapper for HTMLElement method. | ||
removeClass(String className) : void |
Element | |
| Wrapper for Dom method. | ||
removeListener(String type, Function fn) : void |
Element | |
| Remove an event listener | ||
replaceChild(HTMLElement newNode, HTMLElement oldNode) : void |
Element | |
| Wrapper for HTMLElement method. | ||
replaceClass(String oldClassName, String newClassName) : void |
Element | |
| Wrapper for Dom method. | ||
setStyle(String property, String value) : void |
Element | |
| Wrapper for Dom method. | ||
| Event | Defined By | |
|---|---|---|
| available : () | Element | |
| Fires when the Element's HTMLElement can be retrieved by Id. See: Element.addListener Event fields: <String> ty... | ||
| contentReady : () | Element | |
| Fires when the Element's HTMLElement subtree is rendered. See: Element.addListener Event fields: <String> type ... | ||
public Object DOM_EVENTS
public function Element(el {HTMLElement/String}, Object map)
{HTMLElement/String} : elmap : Objectpublic function addClass(String className)
className : Stringvoidpublic function addListener(String type, Function fn, Any obj, Object scope)
type : Stringfn : Functionobj : Anyscope : Objectvoidpublic function appendChild(Boolean deep)
deep : Booleanvoidpublic function appendTo(HTMLElement/Element parentNode, HTMLElement/Element before)
parentNode : HTMLElement/Elementbefore : HTMLElement/Elementvoidpublic function fireQueue()
voidpublic function getElementsByClassName(String className, [String tag])
className : Stringtag : StringArraypublic function getElementsByTagName(String tag)
tag : Stringvoidpublic function getStyle(String property)
property : StringStringpublic function hasChildNodes()
Booleanpublic function hasClass(String className)
className : StringBooleanpublic function initAttributes(Object map)
map : Objectvoidpublic function insertBefore(HTMLElement element, HTMLElement before)
element : HTMLElementbefore : HTMLElementvoidpublic function on(String type, Function fn, Any obj, Object scope)
type : Stringfn : Functionobj : Anyscope : Objectvoidpublic function removeChild(HTMLElement child)
child : HTMLElementvoidpublic function removeClass(String className)
className : Stringvoidpublic function removeListener(String type, Function fn)
type : Stringfn : Functionvoidpublic function replaceChild(HTMLElement newNode, HTMLElement oldNode)
newNode : HTMLElementoldNode : HTMLElementvoidpublic function replaceClass(String oldClassName, String newClassName)
oldClassName : StringnewClassName : Stringvoidpublic function setStyle(String property, String value)
property : Stringvalue : Stringvoidpublic event available
See: Element.addListener
Event fields:
<String> type available
<HTMLElement>
target the HTMLElement bound to this Element instance
Usage:
var handler = function(e) {var target = e.target};
myTabs.addListener('available', handler);
public event contentReady
See: Element.addListener
Event fields:
<String> type contentReady
<HTMLElement>
target the HTMLElement bound to this Element instance
Usage:
var handler = function(e) {var target = e.target};
myTabs.addListener('contentReady', handler);