Class NamedNodeMap
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The NamedNodeMap interface represents a collection of Attr objects. Objects inside a NamedNodeMap are not in any particular order, unlike NodeList, although they may be accessed by an index as in an array.
[Value("NamedNodeMap")]
public class NamedNodeMap
- Inheritance
-
NamedNodeMap
- Inherited Members
Remarks
A NamedNodeMap object is live and will thus be auto-updated if changes are made to its contents internally or elsewhere.
NOTE
Although called
NamedNodeMap, this interface doesn't deal with Node objects but with Attr objects, which are a specialized class of Node objects.
Constructors
NamedNodeMap()
public NamedNodeMap()
Properties
Length
The read-only length property of the NamedNodeMap interface
is the number of objects stored in the map.
[Value("length")]
public ulong Length { get; }
Property Value
- ulong
A number containing the number of objects in the map
Remarks
Methods
GetNamedItemNS(string?, string)
The getNamedItemNS() method of the NamedNodeMap interface returns the Attr corresponding to the given local name in the given namespace, or null if there is no corresponding attribute.
[Value("getNamedItemNS")]
public Attr? GetNamedItemNS(string? namespace_, string localName)
Parameters
Returns
- Attr
An Attr corresponding to the namespace and local name given in parameters, or
nullif none has been found.
Remarks
RemoveNamedItem(string)
The removeNamedItem() method of the NamedNodeMap interface
removes the Attr corresponding to the given name from the map.
[Value("removeNamedItem")]
public Attr RemoveNamedItem(string qualifiedName)
Parameters
qualifiedNamestring
Returns
Remarks
RemoveNamedItemNS(string?, string)
The removeNamedItemNS() method of the NamedNodeMap interface
removes the Attr corresponding to the given namespace and local name from the map.
[Value("removeNamedItemNS")]
public Attr RemoveNamedItemNS(string? namespace_, string localName)
Parameters
Returns
Remarks
SetNamedItem(Attr)
The setNamedItem() method of the NamedNodeMap interface
puts the Attr identified by its name in the map.
If there is already an Attr with the same name in the map,
it is replaced.
[Value("setNamedItem")]
public Attr? SetNamedItem(Attr attr)
Parameters
attrAttr
Returns
- Attr
Returns the old attribute if replaced, or
nullif the attribute is new.
Remarks
SetNamedItemNS(Attr)
The setNamedItemNS() method of the NamedNodeMap interface
puts the Attr identified by its name in the map.
If there was already an Attr with the same name in the map,
it is replaced.
[Value("setNamedItemNS")]
public Attr? SetNamedItemNS(Attr attr)
Parameters
attrAttr
Returns
- Attr
Returns the old attribute if replaced, or
nullif the attribute is new.
Remarks
NOTE
This method is an alias of
setNamedItem()you can use them
interchangeably.