addEventListener
|
Void |
This method allows the registration of an event listener in the default group and, depending on the useCapture parameter, on the capture phase of the DOM event flow or its target and bubbling phases. |
Sytaxis:
object.addEventListener(type, listener, useCapture) Arguments:
Name |
Type |
O/R |
Description |
type |
String |
Required |
Specifies the Event.type associated with the event for which the user is registering. |
listener |
Function |
Required |
Function to be called when the event occurs. |
useCapture |
Boolean |
Required |
If true, user wishes to add the event listener for the capture phase only, if false - for target and bubbling phases. |
|
appendChild
|
Node
|
Appends a child element to the object. |
Sytaxis:
object.appendChild(node) Arguments:
Name |
Type |
O/R |
Description |
node |
Node
|
Required |
The node to add. |
|
canDispatch
|
Void |
Tests wether event of the specified namespace and type can be dispatched. |
Sytaxis:
object.canDispatch(namespaceURI, type) Arguments:
Name |
Type |
O/R |
Description |
namespaceURI |
String |
Required |
NamespaceURI of the event to be tested. |
type |
String |
Required |
Event type. |
|
cloneNode
|
Node
|
Creates a copy of node and returns it. |
Sytaxis:
object.cloneNode(deep) Arguments:
Name |
Type |
O/R |
Description |
deep |
Boolean |
Required |
Indicates wether the childnodes are also to be cloned. |
|
compareDocumentPosition
|
Number |
Compares the reference node, i.e. the node on which this method is being called, with a node, i.e. the one passed as a parameter, with regard to their position in the document and according to the document order. |
Sytaxis:
object.compareDocumentPosition(node) Arguments:
Name |
Type |
O/R |
Description |
node |
Node
|
Required |
The node to compare against the reference node. |
|
dispatchEvent
|
Boolean |
This method allows the dispatch of events into the implementation's event model. Return value indicates whether any of the listeners which handled the event called preventDefault method on Event object. |
Sytaxis:
object.dispatchEvent(event) Arguments:
Name |
Type |
O/R |
Description |
event |
Event
|
Required |
The event to be dispatched. |
|
hasAttributes
|
Boolean |
Retrieves true if the node has any attributes. |
Sytaxis:
object.hasAttributes()
|
hasChildNodes
|
Boolean |
Returns a value that indicates whether the object has children. |
Sytaxis:
object.hasChildNodes()
|
insertBefore
|
Node
|
Inserts a chlid element after the specifyed element to the object. |
Sytaxis:
object.insertBefore(node, before) Arguments:
Name |
Type |
O/R |
Description |
node |
Node
|
Required |
The node to insert. |
before |
Node
|
Required |
The reference node, i.e., the node before which the new node must be inserted. |
|
isDefaultNamespace
|
String |
This method checks if the specified namespaceURI is the default namespace or not. |
Sytaxis:
object.isDefaultNamespace(namespaceURI) Arguments:
Name |
Type |
O/R |
Description |
namespaceURI |
String |
Required |
The namespace URI to look for. |
|
lookupNamespaceURI
|
String |
Look up the namespace URI associated to the given prefix, starting from this node. |
Sytaxis:
object.lookupNamespaceURI(prefix) Arguments:
Name |
Type |
O/R |
Description |
prefix |
String |
Required |
The prefix to look for. If this parameter is null, the method will return the default namespace URI if any. |
|
lookupPrefix
|
String |
Look up the prefix associated to the given namespace URI, starting from this node. |
Sytaxis:
object.lookupPrefix(namespaceURI) Arguments:
Name |
Type |
O/R |
Description |
namespaceURI |
String |
Required |
The namespace URI to look for. |
|
normalize
|
Void |
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form |
Sytaxis:
object.normalize()
|
removeChild
|
Node
|
Removes a child node from the object. |
Sytaxis:
object.removeChild(child) Arguments:
Name |
Type |
O/R |
Description |
child |
Node
|
Required |
The node being removed. |
|
removeEventListener
|
Void |
This method allows the removal of event listeners from the default group. |
Sytaxis:
object.removeEventListener(type, listener, useCapture) Arguments:
Name |
Type |
O/R |
Description |
type |
String |
Required |
Specifies the Event.type for which the user registered the event listener. |
listener |
Function |
Required |
Listener to be removed. |
useCapture |
Boolean |
Required |
Specifies whether the EventListener being removed was registered for the capture phase or not. |
|
replaceChild
|
Node
|
Replaces the given child node by another node. |
Sytaxis:
object.replaceChild(new, child) Arguments:
Name |
Type |
O/R |
Description |
new |
Node
|
Required |
The new node to put in the child list. |
child |
Node
|
Required |
The node being replaced in the list. |
|
toXML
|
String |
Serializes Node to string. |
Sytaxis:
object.toXML()
|