Attr

Extends: Node

See: https://developer.mozilla.org/en-US/docs/Web/API/Attr

new Attr(document, nodeName)

Creates an instance of Attr.

Param
Type
document
Document
nodeName
string

attr.nodeName : string

Read only

attr.localName : string

Read only

attr.name : string

Read only

attr.specified : boolean

Read only

attr.value : \*

attr.nodeType : number

Read only

attr.nodeValue : \*

attr.ownerElement : Element

Read only

attr.contentEditable

Read only

attr.isConnected : boolean

Read only

attr.parentNode : Node

Read only

attr.parentElement : Element

Read only

attr.firstChild : Node

Read only

attr.lastChild : Node

Read only

attr.previousSibling : Node

Read only

attr.nextSibling : Node

Read only

attr.firstElementChild : Node

Read only

attr.lastElementChild : Node

Read only

attr.previousElementSibling : Node

Read only

attr.nextElementSibling : Node

Read only

attr.textContent : string

attr.childNodes : NodeList

Read only

attr.children : HTMLCollection

Read only

attr.ownerDocument

Read only

attr.attributes

Read only

attr.remove()

Overrides: remove

attr.hasChildNodes()

attr.cloneNode(deep)

Param
Type
deep
boolean

attr.appendChild(child)

Param
Type
child
Node

attr.insertBefore(child, before)

Param
Type
child
Node
before
Node

attr.replaceChild(newChild, oldChild)

Param
Type
newChild
Node
oldChild
Node

attr.removeChild(child)

Param
Type
child
Node

attr.before(...nodes)

Param
Type
...nodes
Array.<Node>

attr.after(...nodes)

Param
Type
...nodes
Array.<Node>

attr.replaceWith(...nodes)

Param
Type
...nodes
Array.<Node>

attr.contains(node)

Param
Type
node
Node

attr.addEventListener(eventName, callback, [capture])

Param
Type
Default
eventName
\*
callback
\*
[capture]
boolean
false

attr.removeEventListener(eventName, callback, [capture])

Param
Type
Default
eventName
\*
callback
\*
[capture]
boolean
false

attr.dispatchEvent(event)

Param
Type
event
\*