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.
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
nameOrIndexstring
Returns
- Union52?
If
nameOrIndexrepresents an index,item()returns the Element at the specified index, ornullifnameOrIndexis less than zero or greater than or equal to the length property. IfnameOrIndexrepresents a name,item()returns the same value as HTMLAllCollectionnamedItem.
Remarks
-HTMLCollection.Item