$dom. Element

new Element()

Extends

Methods

appendChild(newNode)

Parameters:
NameTypeDescription
newNode$dom.Node

DOM node to append

Inherited From

getAttribute(attributeName)

Returns the value of a specified attribute on the element

Parameters:
NameTypeDescription
attributeNamestring

the name of the attribute

getAttributeNames()

Returns the attribute names of the element as an Array of strings

getAttributeNS(namespace, localName)

Returns the string value of the attribute with the specified namespace and name

Parameters:
NameTypeDescription
namespacestring

the namespace of the attribute

localNamestring

the local name of the attribute

getElementsByTagName(tagName)

Parameters:
NameTypeDescription
tagNamestring

the name of the tag

getElementsByTagNameNS(namespaceURI, localName)

Parameters:
NameTypeDescription
namespaceURIstring

the namespace of the tag

localNamestring

the local name of the tag

insertBefore(newNode, referenceNode)

Parameters:
NameTypeDescription
newNode$dom.Node

DOM node to append

referenceNode$dom.Node

The node before which newNode is inserted

remove()

removes the object from the tree it belongs to.

Inherited From

removeAttribute(attributeName)

Removes the attribute with the specified name from the element

Parameters:
NameTypeDescription
attributeNamestring

the name of the attribute

removeAttributeNS(namespace, attributeName)

Removes the attribute with the specified name from the element

Parameters:
NameTypeDescription
namespacestring

the namespace of the attribute

attributeNamestring

the local name of the attribute

removeChild(childNode)

removes a child node from the DOM and returns the removed node

Parameters:
NameTypeDescription
childNode$dom.Node

DOM node to remove

Inherited From

setAttribute(name, value)

Sets the value of an attribute on the specified element. If the attribute already exists, the value is updated; otherwise a new attribute is added with the specified name and value

Parameters:
NameTypeDescription
namestring

the name of the attribute

valuestring

the value of the attribute

setAttributeNS(name, value)

Sets the value of an attribute on the specified element. If the attribute already exists, the value is updated; otherwise a new attribute is added with the specified name and value

Parameters:
NameTypeDescription
namestring

the name of the attribute

valuestring

the value of the attribute