Attr
Extends: Node
See: https://developer.mozilla.org/en-US/docs/Web/API/Attr
-
- new Attr(document, nodeName)
- .nodeName :
string - .localName :
string - .name :
string - .specified :
boolean - .value :
\* - .nodeType :
number - .nodeValue :
\* - .ownerElement :
Element - .contentEditable
- .isConnected :
boolean - .parentNode :
Node - .parentElement :
Element - .firstChild :
Node - .lastChild :
Node - .previousSibling :
Node - .nextSibling :
Node - .firstElementChild :
Node - .lastElementChild :
Node - .previousElementSibling :
Node - .nextElementSibling :
Node - .textContent :
string - .childNodes :
NodeList - .children :
HTMLCollection - .ownerDocument
- .attributes
- .remove()
- .hasChildNodes()
- .cloneNode(deep)
- .appendChild(child)
- .insertBefore(child, before)
- .replaceChild(newChild, oldChild)
- .removeChild(child)
- .before(...nodes)
- .after(...nodes)
- .replaceWith(...nodes)
- .contains(node)
- .addEventListener(eventName, callback, [capture])
- .removeEventListener(eventName, callback, [capture])
- .dispatchEvent(event)
new Attr(document, nodeName)
Creates an instance of Attr.
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
booleanattr.appendChild(child)
Param
Type
child
attr.insertBefore(child, before)
attr.replaceChild(newChild, oldChild)
attr.removeChild(child)
Param
Type
child
attr.before(...nodes)
Param
Type
...nodes
attr.after(...nodes)
Param
Type
...nodes
attr.replaceWith(...nodes)
Param
Type
...nodes
attr.contains(node)
Param
Type
node
attr.addEventListener(eventName, callback, [capture])
Param
Type
Default
eventName
\*callback
\*[capture]
booleanfalseattr.removeEventListener(eventName, callback, [capture])
Param
Type
Default
eventName
\*callback
\*[capture]
booleanfalseattr.dispatchEvent(event)
Param
Type
event
\*