Difference between revisions of "lure.dom.node"

(Node Methods)
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
== DOM Node Object ==
+
== Node Object ==
  
 
Desc
 
Desc
  
== DOM Node Properties ==
+
== Node Properties ==
  
 
Properties present in this table are properties currently planned for implementation. Not all W3C DOM Properties will be implemented.
 
Properties present in this table are properties currently planned for implementation. Not all W3C DOM Properties will be implemented.
Line 11: Line 11:
 
! align="left" style="padding-left:10px;" | Description
 
! align="left" style="padding-left:10px;" | Description
 
! align="left" style="padding-left:10px;" | Implemented
 
! align="left" style="padding-left:10px;" | Implemented
 +
|-
 +
|id
 +
|style="padding-left:10px;"|gets or sets the nodes id attribute.
 +
|style="padding-left:10px;"|Yes
 
|-
 
|-
 
|childNodes
 
|childNodes
Line 18: Line 22:
 
|firstChild
 
|firstChild
 
|style="padding-left:10px;"|Returns the first child of a node
 
|style="padding-left:10px;"|Returns the first child of a node
|style="padding-left:10px;"|No
+
|style="padding-left:10px;"|Yes
 
|-
 
|-
|localName
+
|previousSibling
|style="padding-left:10px;"|Returns the local part of the name of a node
+
|style="padding-left:10px;"|Returns the node immediately preceding a node
|style="padding-left:10px;"|No
+
|style="padding-left:10px;"|Yes
 
|-
 
|-
 
|nextSibling
 
|nextSibling
 
|style="padding-left:10px;"|Returns the node immediately following a node
 
|style="padding-left:10px;"|Returns the node immediately following a node
|style="padding-left:10px;"|No
+
|style="padding-left:10px;"|Yes
 
|-
 
|-
 
|lastChild
 
|lastChild
 
|style="padding-left:10px;"|Returns the last child of a node
 
|style="padding-left:10px;"|Returns the last child of a node
|style="padding-left:10px;"|No
+
|style="padding-left:10px;"|Yes
 
|-
 
|-
 
|nodeName
 
|nodeName
Line 42: Line 46:
 
|nodeValue
 
|nodeValue
 
|style="padding-left:10px;"|Sets or returns the value of a node, depending on its type
 
|style="padding-left:10px;"|Sets or returns the value of a node, depending on its type
|style="padding-left:10px;"|Partial
+
|style="padding-left:10px;"|Yes
 
|-
 
|-
 
|ownerDocument
 
|ownerDocument
 
|style="padding-left:10px;"|Returns the root element (document object) for a node
 
|style="padding-left:10px;"|Returns the root element (document object) for a node
|style="padding-left:10px;"|No
+
|style="padding-left:10px;"|Yes
 
|-
 
|-
 
|parentNode
 
|parentNode
Line 65: Line 69:
 
|}
 
|}
  
== DOM Node Methods ==
+
== Node Methods ==
  
 
Methods present in this table are methods currently planned for implementation. Not all W3C DOM methods will be implemented.
 
Methods present in this table are methods currently planned for implementation. Not all W3C DOM methods will be implemented.
Line 83: Line 87:
 
|-
 
|-
 
| hasAttributes()
 
| hasAttributes()
| align="left" style="padding-left:10px;" |Returns true if a node has any attributes, otherwise it returns false
+
| align="left" style="padding-left:10px;" |Returns true if a node has attributes of any name, otherwise it returns false
| align="left" style="padding-left:10px;" |No
+
| align="left" style="padding-left:10px;" |Yes
 +
|-
 +
| hasAttribute()
 +
| align="left" style="padding-left:10px;" |Returns true if a node has the specified attribute, otherwise it returns false
 +
| align="left" style="padding-left:10px;" |Yes
 
|-
 
|-
 
| hasChildNodes()
 
| hasChildNodes()
Line 100: Line 108:
 
| isSameNode()
 
| isSameNode()
 
| align="left" style="padding-left:10px;" |Checks if two nodes are the same node
 
| align="left" style="padding-left:10px;" |Checks if two nodes are the same node
| align="left" style="padding-left:10px;" |No
+
| align="left" style="padding-left:10px;" |Yes
 
|-
 
|-
 
| normalize()
 
| normalize()
| align="left" style="padding-left:10px;" |Puts all text nodes underneath a node (including attributes) into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes
+
| align="left" style="padding-left:10px;" |Puts all text nodes underneath a node (including attributes) into a "normal" form where only structure separates Text nodes.
 
| align="left" style="padding-left:10px;" |No
 
| align="left" style="padding-left:10px;" |No
 
|-
 
|-
 
| removeChild()
 
| removeChild()
 
| align="left" style="padding-left:10px;" |Removes a child node
 
| align="left" style="padding-left:10px;" |Removes a child node
 +
| align="left" style="padding-left:10px;" |Yes
 +
|-
 +
| removeAttribute()
 +
| align="left" style="padding-left:10px;" |Removes attribute from the current node's attribute collection
 
| align="left" style="padding-left:10px;" |Yes
 
| align="left" style="padding-left:10px;" |Yes
 
|-
 
|-
Line 113: Line 125:
 
| align="left" style="padding-left:10px;" |Replaces a child node
 
| align="left" style="padding-left:10px;" |Replaces a child node
 
| align="left" style="padding-left:10px;" |No
 
| align="left" style="padding-left:10px;" |No
 +
|-
 +
| getAttribute()
 +
| align="left" style="padding-left:10px;" |Gets attribute value from the current node's attribute collection
 +
| align="left" style="padding-left:10px;" |Yes
 +
|-
 +
| setAttribute()
 +
| align="left" style="padding-left:10px;" |Sets attribute value from the current node's attribute collection. Creates the attribute if it doesn't exist
 +
| align="left" style="padding-left:10px;" |Yes
 +
|-
 +
| getElementsByTagName()
 +
| align="left" style="padding-left:10px;" |Returns a NodeList of all child elements with a specified name
 +
| align="left" style="padding-left:10px;" |Yes
 +
|-
 +
| getElementsByClassName()
 +
| align="left" style="padding-left:10px;" |Returns a NodeList of all child elements with a specified class under
 +
| align="left" style="padding-left:10px;" |Yes
 +
|-
 +
| getElementById()
 +
| align="left" style="padding-left:10px;" |Returns the child node with the specified id from the calling node
 +
| align="left" style="padding-left:10px;" |Yes
 
|}
 
|}
  
 
+
== Node Inherited Properties ==
== DOM Node Inherited Properties ==
 
  
 
This Object does not inherit Properties from any base Object
 
This Object does not inherit Properties from any base Object
  
== DOM Node Inherited Methods ==
+
== Node Inherited Methods ==
  
 
This Object does not inherit Methods from any base Object
 
This Object does not inherit Methods from any base Object

Latest revision as of 20:56, 31 December 2011

Node Object

Desc

Node Properties

Properties present in this table are properties currently planned for implementation. Not all W3C DOM Properties will be implemented.

Property Description Implemented
id gets or sets the nodes id attribute. Yes
childNodes Returns a NodeList of child nodes for a node Yes
firstChild Returns the first child of a node Yes
previousSibling Returns the node immediately preceding a node Yes
nextSibling Returns the node immediately following a node Yes
lastChild Returns the last child of a node Yes
nodeName Returns the name of a node, depending on its type Yes
nodeType Returns the type of a node Yes
nodeValue Sets or returns the value of a node, depending on its type Yes
ownerDocument Returns the root element (document object) for a node Yes
parentNode Returns the parent node of a node Yes
textContent Sets or returns the textual content of a node and its descendants No
text Returns the text of a node and its descendants. No
xml Returns the XML of a node and its descendants. No

Node Methods

Methods present in this table are methods currently planned for implementation. Not all W3C DOM methods will be implemented.

Method Description Implemented
appendChild() Adds a new child node to the end of the list of children of a node Yes
cloneNode() Clones a node No
hasAttributes() Returns true if a node has attributes of any name, otherwise it returns false Yes
hasAttribute() Returns true if a node has the specified attribute, otherwise it returns false Yes
hasChildNodes() Returns true if a node has any child nodes, otherwise it returns false Yes
insertBefore() Inserts a new child node before an existing child node No
isEqualNode() Checks if two nodes are equal No
isSameNode() Checks if two nodes are the same node Yes
normalize() Puts all text nodes underneath a node (including attributes) into a "normal" form where only structure separates Text nodes. No
removeChild() Removes a child node Yes
removeAttribute() Removes attribute from the current node's attribute collection Yes
replaceChild() Replaces a child node No
getAttribute() Gets attribute value from the current node's attribute collection Yes
setAttribute() Sets attribute value from the current node's attribute collection. Creates the attribute if it doesn't exist Yes
getElementsByTagName() Returns a NodeList of all child elements with a specified name Yes
getElementsByClassName() Returns a NodeList of all child elements with a specified class under Yes
getElementById() Returns the child node with the specified id from the calling node Yes

Node Inherited Properties

This Object does not inherit Properties from any base Object

Node Inherited Methods

This Object does not inherit Methods from any base Object