Table of Contents

Class HTMLAllCollection

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The HTMLAllCollection interface represents a collection of all of the document's elements, accessible by index (like an array) and by the element's id. It is returned by the All property.

[Value("HTMLAllCollection")]
public class HTMLAllCollection
Inheritance
HTMLAllCollection
Inherited Members

Remarks

HTMLAllCollection has a very similar shape to HTMLCollection, but there are many subtle behavior differences — for example, HTMLAllCollection can be called as a function, and its item() method can be called with a string representing an element's id or name attribute.

-HTMLCollection

See also on MDN

Constructors

HTMLAllCollection()

public HTMLAllCollection()

Properties

Length

The HTMLAllCollection.length property returns the number of items in this HTMLAllCollection.

[Value("length")]
public ulong Length { get; }

Property Value

ulong

An integer value representing the number of items in this HTMLAllCollection.

Remarks

Methods

Item(string)

The item() method of the HTMLAllCollection interface returns the element located at the specified offset into the collection, or the element with the specified value for its id or name attribute.

[Value("item")]
public Union52? Item(string nameOrIndex = null)

Parameters

nameOrIndex string

Returns

Union52?

If nameOrIndex represents an index, item() returns the Element at the specified index, or null if nameOrIndex is less than zero or greater than or equal to the length property. If nameOrIndex represents a name, item() returns the same value as HTMLAllCollectionnamedItem.

Remarks

-HTMLCollection.Item

See also on MDN