HtmlAllCollection Class
https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#the-htmlallcollection-interface. The [[IsHTMLDDA]] and [[Call]] behaviors only exist in JavaScript.
public sealed class HtmlAllCollection : IEnumerable<Element>, IReadOnlyCollection<Element>, IReadOnlyList<Element>, IEnumerableProperties
| Name | Description |
|---|---|
| Count | Gets the number of elements in the collection. |
| Length | Gets the number of elements in the collection. |
Count
HtmlAllCollection.csLength
HtmlAllCollection.csGets the number of elements in the collection.
public uint Length { get; }Indexers
| Name | Description |
|---|---|
| this[int] | Gets the element at the given index. |
| this[string] | Gets the element or the collection of elements with the given id or name, or null when there is none. |
| this[uint] | https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmlallcollection-item |
ItemAt overloads
this[int]
HtmlAllCollection.csthis[string]
HtmlAllCollection.csGets the element or the collection of elements with the given id or name, or null when there is none.
public HtmlCollectionOrElement? this[string name] { get; }this[uint]
HtmlAllCollection.cshttps://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmlallcollection-item
Methods
| Name | Description |
|---|---|
| GetEnumerator() | Returns an enumerator that iterates through the collection. |
| Item(string?) | https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmlallcollection-item |
| NamedItem(string) | https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmlallcollection-nameditem |
| System.Collections.Generic.IReadOnlyList<Meziantou.Framework.WebPlatform.Dom.Element>.get_Item(int) | |
| System.Collections.IEnumerable.GetEnumerator() |
GetEnumerator()
HtmlAllCollection.csReturns an enumerator that iterates through the collection.
public IEnumerator<Element> GetEnumerator()Returns
IEnumerator<Element> An enumerator that can be used to iterate through the collection.
Item(string?)
HtmlAllCollection.cshttps://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmlallcollection-item
public HtmlCollectionOrElement? Item(string? nameOrIndex = null)NamedItem(string)
HtmlAllCollection.cshttps://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmlallcollection-nameditem
public HtmlCollectionOrElement? NamedItem(string name)