public class JsHTMLCollection extends JsIndexable implements HTMLCollection, Indexable
Modifier | Constructor and Description |
---|---|
protected |
JsHTMLCollection() |
Modifier and Type | Method and Description |
---|---|
int |
getLength()
The number of items in the collection.
|
JsNode |
item(int index)
Returns the specific node at the given zero-based
index into the list. |
JsNode |
namedItem(String name)
Returns the specific node whose ID or, as a fallback, name matches the string specified by
name . |
at, at, intAt, intAt, length, numberAt, numberAt, setAt, setAt, setAt, setAt, setAt, setAt
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
public final int getLength()
HTMLCollection
getLength
in interface HTMLCollection
public final JsNode item(int index)
HTMLCollection
index
into the list. Returns null
if the index
is out of range.item
in interface HTMLCollection
public final JsNode namedItem(String name)
HTMLCollection
name
. Matching by name is only done as a last resort, only in HTML, and only if the referenced element supports the name
attribute. Returns null
if no node exists by the given name.namedItem
in interface HTMLCollection
Copyright © 2016. All rights reserved.