NamedNodeMap Class

https://dom.spec.whatwg.org/#interface-namednodemap

public sealed class NamedNodeMap : IEnumerable<Attr>, IReadOnlyCollection<Attr>, IReadOnlyList<Attr>, IEnumerable
Implements

Properties

NameDescription
CountGets the number of attributes in the map.
LengthGets the number of attributes in the map.

Gets the number of attributes in the map.

public int Count { get; }

Property value

int

Gets the number of attributes in the map.

public uint Length { get; }

Indexers

NameDescription
this[int]Gets the attribute at the given index, and throws when the index is out of range.
this[string]Gets the attribute with the given qualified name, or null when there is none.
this[uint]Gets the attribute at the given index, or null when the index is out of range.

ItemAt overloads

Gets the attribute at the given index, and throws when the index is out of range.

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

Attr

this[string]

NamedNodeMap.cs

Gets the attribute with the given qualified name, or null when there is none.

public Attr? this[string qualifiedName] { get; }
Parameters
qualifiedName string
Property value

Attr?

See also

this[uint]

NamedNodeMap.cs

Gets the attribute at the given index, or null when the index is out of range.

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

Methods

NameDescription
GetEnumerator()Returns an enumerator that iterates through the collection.
GetNamedItem(string)Returns the attribute with the given qualified name, or null when there is none.
GetNamedItemNS(string?, string)Returns the attribute with the given namespace and local name, or null when there is none.
Item(uint)Returns the attribute at the given index, or null when the index is out of range.
RemoveNamedItem(string)https://dom.spec.whatwg.org/#dom-namednodemap-removenameditem
RemoveNamedItemNS(string?, string)https://dom.spec.whatwg.org/#dom-namednodemap-removenameditemns
SetNamedItem(Attr)Adds the attribute to the element and returns the attribute it replaced, or null.
SetNamedItemNS(Attr)Adds the attribute to the element and returns the attribute it replaced, or null.
System.Collections.Generic.IReadOnlyList<Meziantou.Framework.WebPlatform.Dom.Attr>.get_Item(int)
System.Collections.IEnumerable.GetEnumerator()

GetEnumerator()

NamedNodeMap.cs

Returns an enumerator that iterates through the collection.

public IEnumerator<Attr> GetEnumerator()

Returns

IEnumerator<Attr> An enumerator that can be used to iterate through the collection.

GetNamedItem(string)

NamedNodeMap.cs

Returns the attribute with the given qualified name, or null when there is none.

public Attr? GetNamedItem(string qualifiedName)

GetNamedItemNS(string?, string)

NamedNodeMap.cs

Returns the attribute with the given namespace and local name, or null when there is none.

public Attr? GetNamedItemNS(string? @namespace, string localName)

Item(uint)

NamedNodeMap.cs

Returns the attribute at the given index, or null when the index is out of range.

public Attr? Item(uint index)

RemoveNamedItem(string)

NamedNodeMap.cs

https://dom.spec.whatwg.org/#dom-namednodemap-removenameditem

public Attr RemoveNamedItem(string qualifiedName)

RemoveNamedItemNS(string?, string)

NamedNodeMap.cs

https://dom.spec.whatwg.org/#dom-namednodemap-removenameditemns

public Attr RemoveNamedItemNS(string? @namespace, string localName)

SetNamedItem(Attr)

NamedNodeMap.cs

Adds the attribute to the element and returns the attribute it replaced, or null.

public Attr? SetNamedItem(Attr attr)

SetNamedItemNS(Attr)

NamedNodeMap.cs

Adds the attribute to the element and returns the attribute it replaced, or null.

public Attr? SetNamedItemNS(Attr attr)

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

Attr IReadOnlyList<Attr>.get_Item(int index)

Parameters

index int

Returns

Attr

No documentation is available.

System.Collections.IEnumerable.GetEnumerator()

NamedNodeMap.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.