Interface IHtmlCollection<T>
- Namespace
- AngleSharp.Dom
- Assembly
- AngleSharp.dll
HTMLCollection is an interface representing a generic collection (array) of elements (in document order) and offers methods and properties for selecting from the list.
[DomName("HTMLCollection")]
public interface IHtmlCollection<T> : IEnumerable<T>, IEnumerable where T : IElement
Type Parameters
T
- Inherited Members
- Extension Methods
Properties
this[int]
Gets the specific node at the given zero-based index into the list.
[DomName("item")]
[DomAccessor(Accessors.Getter)]
T this[int index] { get; }
Parameters
index
intThe zero-based index.
Property Value
- T
Returns the element at the specified index.
this[string]
Gets the specific node whose ID or, as a fallback, name matches the string specified by name. Matching by name is only done as a last resort, only in HTML, and only if the referenced element supports the name attribute.
[DomName("namedItem")]
[DomAccessor(Accessors.Getter)]
T? this[string id] { get; }
Parameters
id
stringThe id or name to match.
Property Value
- T
Returns the element with the specified name.
Length
Gets the number of items in the collection.
[DomName("length")]
int Length { get; }