NamedNodeMap Class
https://dom.spec.whatwg.org/#interface-namednodemap
public sealed class NamedNodeMap : IEnumerable<Attr>, IReadOnlyCollection<Attr>, IReadOnlyList<Attr>, IEnumerableProperties
| Name | Description |
|---|---|
| Count | Gets the number of attributes in the map. |
| Length | Gets the number of attributes in the map. |
Count
NamedNodeMap.csLength
NamedNodeMap.csGets the number of attributes in the map.
public uint Length { get; }Indexers
| Name | Description |
|---|---|
| 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
this[int]
NamedNodeMap.csthis[string]
NamedNodeMap.csGets the attribute with the given qualified name, or null when there is none.
this[uint]
NamedNodeMap.csGets the attribute at the given index, or null when the index is out of range.
Methods
| Name | Description |
|---|---|
| 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.csReturns 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.csReturns the attribute with the given qualified name, or null when there is none.
GetNamedItemNS(string?, string)
NamedNodeMap.csItem(uint)
NamedNodeMap.csReturns the attribute at the given index, or null when the index is out of range.
RemoveNamedItem(string)
NamedNodeMap.cshttps://dom.spec.whatwg.org/#dom-namednodemap-removenameditem
RemoveNamedItemNS(string?, string)
NamedNodeMap.csSetNamedItem(Attr)
NamedNodeMap.csAdds the attribute to the element and returns the attribute it replaced, or null.
SetNamedItemNS(Attr)
NamedNodeMap.csAdds the attribute to the element and returns the attribute it replaced, or null.