Java Reference
In-Depth Information
Text
The Text object represents text content of an Element or Attr object.
Methods
Method Name
Description
Introduced
splitText(indexOffset)
Breaks the Text node into two nodes at the
specifi ed offset. The new nodes stay in the DOM
tree as siblings.
Level 1
HTML DOM Objects
In order to adequately interface with the DOM, the W3C extends the DOM Level 1 and 2 specifi cations
to describe objects, properties, and methods, specifi c to HTML documents.
Most of the objects you'll interface with as a front-end developer are contained in this section.
Miscellaneous Objects: The HTML Collection
The HTMLCollection object is a list of nodes, much like NodeList. It does not inherit from NodeList,
but HTMLCollections are considered live, like NodeLists, and are automatically updated when
changes are made to the document.
Properties
Property Name
Description
Introduced
length
Returns the number of elements in the collection.
Level 1
Methods
Method Name
Description
Introduced
item(index)
Returns the element at the specifi ed index. Returns null if
index it larger than the collection's length.
Level 1
namedItem(name)
Returns the element using a name. It fi rst searches for an
element with a matching id attribute value. If none are
found, it searches for elements with a matching name attri-
bute value.
Level 1
Search WWH ::




Custom Search