|
|
In DOM Level 2, the method normalize is inherited from the Node interface where it was moved.
|
|
tagName
|
|
|
Access
|
read-only
|
|
Returns
|
String
|
|
getAttribute name
|
|
|
Parameters
|
String name
The name of the attribute to retrieve.
|
|
Returns
|
String. The Attr value as a string, or the empty string if that attribute does not have a specified or default value.
|
|
getAttributeNS namespaceURI localName
|
|
|
Parameters
|
String namespaceURI
The namespace URI of the attribute to retrieve.
String localName
The local name of the attribute to retrieve.
|
|
Returns
|
String. The Attr value as a string, or the empty string if that attribute does not have a specified or default value.
|
|
getAttributeNode name
|
|
|
Parameters
|
String name
The name (nodeName) of the attribute to retrieve.
|
|
Returns
|
Attr. The Attr node with the specified name (nodeName) or null if there is no such attribute.
|
|
getAttributeNodeNS namespaceURI localName
|
|
|
Parameters
|
String namespaceURI
The namespace URI of the attribute to retrieve.
String localName
The local name of the attribute to retrieve.
|
|
Returns
|
Attr. The Attr node with the specified attribute local name and namespace URI or null if there is no such attribute.
|
|
getElementsByTagName name
|
|
|
Parameters
|
String name
The name of the tag to match on. The special value "*" matches all tags.
|
|
Returns
|
NodeList. A list of matching Element nodes.
|
|
getElementsByTagNameNS namespaceURI localName
|
|
|
Parameters
|
String namespaceURI
The namespace URI of the elements to match on. The special value "*" matches all namespaces.
String localName
The local name of the elements to match on. The special value "*" matches all local names.
|
|
Returns
|
NodeList. A new NodeList object containing all the matched Elements.
|
|
hasAttribute name
|
|
|
Parameters
|
String name
The name of the attribute to look for.
|
|
Returns
|
trueboolean. if an attribute with the given name is specified on this element or has a default value, false otherwise.
|
|
hasAttributeNS namespaceURI localName
|
|
|
Parameters
|
String namespaceURI
The namespace URI of the attribute to look for.
String localName
The local name of the attribute to look for.
|
|
Returns
|
trueboolean. if an attribute with the given local name and namespace URI is specified or has a default value on this element, false otherwise.
|
|
removeAttribute name
|
|
|
Parameters
|
String name
The name of the attribute to remove.
|
|
Returns
|
void
|
|
Throws
|
DOMException
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
|
|
removeAttributeNS namespaceURI localName
|
|
|
Parameters
|
String namespaceURI
The namespace URI of the attribute to remove.
String localName
The local name of the attribute to remove.
|
|
Returns
|
void
|
|
Throws
|
DOMException
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
|
|
removeAttributeNode oldAttr
|
|
|
Parameters
|
Attr oldAttr
The Attr node to remove from the attribute list.
|
|
Returns
|
Attr. The Attr node that was removed.
|
|
Throws
|
DOMException
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if oldAttr is not an attribute of the element.
|
|
setAttribute name value
|
|
|
Parameters
|
String name
The name of the attribute to create or alter.
String value
Value to set in string form.
|
|
Returns
|
void
|
|
Throws
|
DOMException
INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
|
|
setAttributeNS namespaceURI qualifiedName value
|
|
|
Parameters
|
String namespaceURI
The namespace URI of the attribute to create or alter.
String qualifiedName
The qualified name of the attribute to create or alter.
String value
The value to set in string form.
|
|
Returns
|
void
|
|
Throws
|
DOMException
INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NAMESPACE_ERR: Raised if the qualifiedName is malformed, if the qualifiedName has a prefix and the namespaceURI is null, if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from the xml namespace, or if the qualifiedName is "xmlns" and the namespaceURI is different from the xml namespace.
|
|
setAttributeNode newAttr
|
|
|
Parameters
|
Attr newAttr
The Attr node to add to the attribute list.
|
|
Returns
|
Attr. If the newAttr attribute replaces an existing attribute, the replaced Attr node is returned, otherwise null is returned.
|
|
Throws
|
DOMException
WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
|
|
setAttributeNodeNS newAttr
|
|
|
Parameters
|
Attr newAttr
The Attr node to add to the attribute list.
|
|
Returns
|
Attr. If the newAttr attribute replaces an existing attribute with the same local name and namespace URI, the replaced Attr node is returned, otherwise null is returned.
|
|
Throws
|
DOMException
WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
|