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>, IEnumerable
Implements

Properties

NameDescription
CountGets the number of elements in the collection.
LengthGets the number of elements in the collection.

Gets the number of elements in the collection.

public int Count { get; }

Property value

int

Gets the number of elements in the collection.

public uint Length { get; }

Indexers

NameDescription
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

Gets the element at the given index.

public Element this[int index] { get; }
Parameters
index int
Property value

Element

Gets 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; }

https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmlallcollection-item

public Element? this[uint index] { get; }

Methods

NameDescription
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.cs

Returns 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.

https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmlallcollection-item

public HtmlCollectionOrElement? Item(string? nameOrIndex = null)

NamedItem(string)

HtmlAllCollection.cs

https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#dom-htmlallcollection-nameditem

public HtmlCollectionOrElement? NamedItem(string name)

System.Collections.Generic.IReadOnlyList<Meziantou.Framework.WebPlatform.Dom.Element>.get_Item(int)

Element IReadOnlyList<Element>.get_Item(int index)

Parameters

index int

Returns

Element

No documentation is available.

System.Collections.IEnumerable.GetEnumerator()

HtmlAllCollection.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.