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
: Stringvoid
public function addListener(String type
, Function fn
, Any obj
, Object scope
)
type
: Stringfn
: Functionobj
: Anyscope
: Objectvoid
public function appendChild(Boolean deep
)
deep
: Booleanvoid
public function appendTo(HTMLElement/Element parentNode
, HTMLElement/Element before
)
parentNode
: HTMLElement/Elementbefore
: HTMLElement/Elementvoid
public function fireQueue()
void
public function getElementsByClassName(String className
, [String tag
])
className
: Stringtag
: StringArray
public function getElementsByTagName(String tag
)
tag
: Stringvoid
public function getStyle(String property
)
property
: StringString
public function hasChildNodes()
Boolean
public function hasClass(String className
)
className
: StringBoolean
public function initAttributes(Object map
)
map
: Objectvoid
public function insertBefore(HTMLElement element
, HTMLElement before
)
element
: HTMLElementbefore
: HTMLElementvoid
public function on(String type
, Function fn
, Any obj
, Object scope
)
type
: Stringfn
: Functionobj
: Anyscope
: Objectvoid
public function removeChild(HTMLElement child
)
child
: HTMLElementvoid
public function removeClass(String className
)
className
: Stringvoid
public function removeListener(String type
, Function fn
)
type
: Stringfn
: Functionvoid
public function replaceChild(HTMLElement newNode
, HTMLElement oldNode
)
newNode
: HTMLElementoldNode
: HTMLElementvoid
public function replaceClass(String oldClassName
, String newClassName
)
oldClassName
: StringnewClassName
: Stringvoid
public function setStyle(String property
, String value
)
property
: Stringvalue
: Stringvoid
public 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);