new Element()
Extends
Methods
appendChild(newNode)
Name | Type | Description |
---|---|---|
newNode | $dom.Node | DOM node to append |
- Inherited From
getAttribute(attributeName)
Returns the value of a specified attribute on the element
Name | Type | Description |
---|---|---|
attributeName | string | 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
Name | Type | Description |
---|---|---|
namespace | string | the namespace of the attribute |
localName | string | the local name of the attribute |
getElementsByTagName(tagName)
Name | Type | Description |
---|---|---|
tagName | string | the name of the tag |
getElementsByTagNameNS(namespaceURI, localName)
Name | Type | Description |
---|---|---|
namespaceURI | string | the namespace of the tag |
localName | string | the local name of the tag |
insertBefore(newNode, referenceNode)
Name | Type | Description |
---|---|---|
newNode | $dom.Node | DOM node to append |
referenceNode | $dom.Node | The node before which newNode is inserted |
- Inherited From
remove()
removes the object from the tree it belongs to.
- Inherited From
removeAttribute(attributeName)
Removes the attribute with the specified name from the element
Name | Type | Description |
---|---|---|
attributeName | string | the name of the attribute |
removeAttributeNS(namespace, attributeName)
Removes the attribute with the specified name from the element
Name | Type | Description |
---|---|---|
namespace | string | the namespace of the attribute |
attributeName | string | the local name of the attribute |
removeChild(childNode)
removes a child node from the DOM and returns the removed node
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
name | string | the name of the attribute |
value | string | 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
Name | Type | Description |
---|---|---|
name | string | the name of the attribute |
value | string | the value of the attribute |