Class Index | File Index

Classes


Namespace YAHOO.util.Element

YAHOO.util Element provides an interface to an HTMLElement's attributes and common methods. Other commonly used attributes are added as well.
Defined in: tabview.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Element provides an interface to an HTMLElement's attributes and common methods.
Field Summary
Field Attributes Field Name and Description
 
Dom events supported by the Element instance.
Method Summary
Method Attributes Method Name and Description
 
addClass(className)
Wrapper for Dom method.
 
addListener(type, fn, obj, scope)
Adds a listener for the given event.
 
Wrapper for HTMLElement method.
 
appendTo(parentNode, before)
Appends the HTMLElement into either the supplied parentNode.
 
Apply any queued set calls.
 
getElementsByClassName(className, tag)
Wrapper for Dom method.
 
Wrapper for HTMLElement method.
 
getStyle(property)
Wrapper for Dom method.
 
Wrapper for HTMLElement method.
 
hasClass(className)
Wrapper for Dom method.
 
Registers Element specific attributes.
 
insertBefore(element, before)
Wrapper for HTMLElement method.
 
on(type, fn, obj, scope)
Alias for addListener
 
removeChild(child)
Wrapper for HTMLElement method.
 
removeClass(className)
Wrapper for Dom method.
 
removeListener(type, fn)
Remove an event listener
 
replaceChild(newNode, oldNode)
Wrapper for HTMLElement method.
 
replaceClass(oldClassName, newClassName)
Wrapper for Dom method.
 
setStyle(property, value)
Wrapper for Dom method.
Namespace Detail
YAHOO.util.Element
Element provides an interface to an HTMLElement's attributes and common methods. Other commonly used attributes are added as well.
Parameters:
el
{HTMLElement | String} The html element that represents the Element.
{Object} map
A key-value map of initial config names and values
Field Detail
{Object} DOM_EVENTS
Dom events supported by the Element instance.
Method Detail
addClass(className)
Wrapper for Dom method.
Parameters:
{String} className
The className to add

addListener(type, fn, obj, scope)
Adds a listener for the given event. These may be DOM or customEvent listeners. Any event that is fired via fireEvent can be listened for. All handlers receive an event object.
Parameters:
{String} type
The name of the event to listen for
{Function} fn
The handler to call when the event fires
{Any} obj
A variable to pass to the handler
{Object} scope
The object to use for the scope of the handler

appendChild(deep)
Wrapper for HTMLElement method.
Parameters:
{Boolean} deep
Whether or not to do a deep clone

appendTo(parentNode, before)
Appends the HTMLElement into either the supplied parentNode.
Parameters:
{HTMLElement | Element} parentNode
The node to append to
{HTMLElement | Element} before
An optional node to insert before

fireQueue()
Apply any queued set calls.

{Array} getElementsByClassName(className, tag)
Wrapper for Dom method.
Parameters:
{String} className
The className to collect
{String} tag
(optional) The tag to use in conjunction with class name
Returns:
{Array} Array of HTMLElements

getElementsByTagName(tag)
Wrapper for HTMLElement method.
Parameters:
{String} tag
The tagName to collect

{String} getStyle(property)
Wrapper for Dom method.
Parameters:
{String} property
The style property to retrieve
Returns:
{String} The current value of the property

{Boolean} hasChildNodes()
Wrapper for HTMLElement method.
Returns:
{Boolean} Whether or not the element has childNodes

{Boolean} hasClass(className)
Wrapper for Dom method.
Parameters:
{String} className
The className to add
Returns:
{Boolean} Whether or not the element has the class name

initAttributes(map)
Registers Element specific attributes.
Parameters:
{Object} map
A key-value map of initial attribute configs

insertBefore(element, before)
Wrapper for HTMLElement method.
Parameters:
{HTMLElement} element
The HTMLElement to insert
{HTMLElement} before
The HTMLElement to insert the element before.

on(type, fn, obj, scope)
Alias for addListener
Parameters:
{String} type
The name of the event to listen for
{Function} fn
The function call when the event fires
{Any} obj
A variable to pass to the handler
{Object} scope
The object to use for the scope of the handler

removeChild(child)
Wrapper for HTMLElement method.
Parameters:
{HTMLElement} child
The HTMLElement to remove

removeClass(className)
Wrapper for Dom method.
Parameters:
{String} className
The className to remove

removeListener(type, fn)
Remove an event listener
Parameters:
{String} type
The name of the event to listen for
{Function} fn
The function call when the event fires

replaceChild(newNode, oldNode)
Wrapper for HTMLElement method.
Parameters:
{HTMLElement} newNode
The HTMLElement to insert
{HTMLElement} oldNode
The HTMLElement to replace

replaceClass(oldClassName, newClassName)
Wrapper for Dom method.
Parameters:
{String} oldClassName
The className to replace
{String} newClassName
The className to add

setStyle(property, value)
Wrapper for Dom method.
Parameters:
{String} property
The style property to set
{String} value
The value to apply to the style property

Documentation generated by JsDoc Toolkit 2.0.0 on Thu Dec 02 2010 15:18:58 GMT+0100 (CET)