HTMLElement
Extends: Element
See: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
- HTMLElement
- new HTMLElement(document, nodeName, namespaceURI)
- .dataset
- .nodeName :
string
- .localName :
string
- .tagName :
string
- .nodeType :
number
- .namespaceURI :
string
- .id :
string
- .tabIndex :
number
- .className :
string
- .attributes :
NamedNodeMap
- .style :
Style
- .clientLeft :
number
- .clientTop :
number
- .clientWidth :
number
- .clientHeight :
number
- .height :
string
orNumber
- .width :
string
orNumber
- .offsetParent :
Element
- .offsetLeft :
number
- .offsetTop :
number
- .offsetWidth :
number
- .offsetHeight :
number
- .scrollLeft :
number
- .scrollTop :
number
- .scrollWidth :
number
- .scrollHeight :
number
- .uxpContainer :
UXPContainer
- .disabled :
boolean
- .innerHTML :
string
- .outerHTML :
string
- .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
- .scrollIntoView()
- .scrollIntoViewIfNeeded()
- .focus()
- .blur()
- .getAttribute(name)
- .setAttribute(name, value)
- .removeAttribute(name)
- .hasAttribute(name)
- .getAttributeNode(name)
- .setAttributeNode(newAttr)
- .removeAttributeNode(oldAttr)
- .click()
- .getElementsByClassName(name)
- .getElementsByTagName(name)
- .querySelector(selector)
- .querySelectorAll(selector)
- .getBoundingClientRect()
- .insertAdjacentHTML(position, value)
- .insertAdjacentElement(position, node)
- .insertAdjacentText(position, text)
- .hasChildNodes()
- .cloneNode(deep)
- .appendChild(child)
- .insertBefore(child, before)
- .replaceChild(newChild, oldChild)
- .removeChild(child)
- .remove()
- .before(...nodes)
- .after(...nodes)
- .replaceWith(...nodes)
- .contains(node)
- .addEventListener(eventName, callback, [capture])
- .removeEventListener(eventName, callback, [capture])
- .dispatchEvent(event)
new HTMLElement(document, nodeName, namespaceURI)
Creates an instance of HTMLElement.
Param | Type |
---|---|
document | * |
nodeName | * |
namespaceURI | * |
htmlElement.dataset
Access to all the custom data attributes (data-*) set.
See: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset
htmlElement.nodeName : string
Read only
htmlElement.localName : string
Read only
htmlElement.tagName : string
Read only
htmlElement.nodeType : number
Read only
htmlElement.namespaceURI : string
Read only
htmlElement.id : string
htmlElement.tabIndex : number
htmlElement.className : string
htmlElement.attributes : NamedNodeMap
Read only
htmlElement.style : Style
Read only
htmlElement.clientLeft : number
Read only
htmlElement.clientTop : number
Read only
htmlElement.clientWidth : number
Read only
htmlElement.clientHeight : number
Read only
htmlElement.height : string
or Number
The height of the element
htmlElement.width : string
or Number
The width of the element
htmlElement.offsetParent : Element
Read only
htmlElement.offsetLeft : number
Read only
htmlElement.offsetTop : number
Read only
htmlElement.offsetWidth : number
Read only
htmlElement.offsetHeight : number
Read only
htmlElement.scrollLeft : number
htmlElement.scrollTop : number
htmlElement.scrollWidth : number
Read only
htmlElement.scrollHeight : number
Read only
htmlElement.uxpContainer : UXPContainer
Read only
htmlElement.disabled : boolean
htmlElement.innerHTML : string
htmlElement.outerHTML : string
htmlElement.contentEditable
Read only
htmlElement.isConnected : boolean
Read only
htmlElement.parentNode : Node
Read only
htmlElement.parentElement : Element
Read only
htmlElement.firstChild : Node
Read only
htmlElement.lastChild : Node
Read only
htmlElement.previousSibling : Node
Read only
htmlElement.nextSibling : Node
Read only
htmlElement.firstElementChild : Node
Read only
htmlElement.lastElementChild : Node
Read only
htmlElement.previousElementSibling : Node
Read only
htmlElement.nextElementSibling : Node
Read only
htmlElement.textContent : string
htmlElement.childNodes : NodeList
Read only
htmlElement.children : HTMLCollection
Read only
htmlElement.ownerDocument
Read only
htmlElement.scrollIntoView()
htmlElement.scrollIntoViewIfNeeded()
htmlElement.focus()
htmlElement.blur()
htmlElement.getAttribute(name)
Param | Type |
---|---|
name | string |
htmlElement.setAttribute(name, value)
Param | Type |
---|---|
name | string |
value | string |
htmlElement.removeAttribute(name)
Param | Type |
---|---|
name | string |
htmlElement.hasAttribute(name)
Param | Type |
---|---|
name | string |
htmlElement.getAttributeNode(name)
Param | Type |
---|---|
name | string |
htmlElement.setAttributeNode(newAttr)
Param | Type |
---|---|
newAttr | * |
htmlElement.removeAttributeNode(oldAttr)
Param | Type |
---|---|
oldAttr | * |
htmlElement.click()
htmlElement.getElementsByClassName(name)
Param | Type |
---|---|
name | string |
htmlElement.getElementsByTagName(name)
Param | Type |
---|---|
name | string |
htmlElement.querySelector(selector)
Param | Type |
---|---|
selector | string |
htmlElement.querySelectorAll(selector)
Param | Type |
---|---|
selector | string |
htmlElement.getBoundingClientRect()
htmlElement.insertAdjacentHTML(position, value)
Param | Type |
---|---|
position | |
value | string |
htmlElement.insertAdjacentElement(position, node)
Param | Type |
---|---|
position | * |
node | * |
htmlElement.insertAdjacentText(position, text)
Param | Type |
---|---|
position | * |
text | * |
htmlElement.hasChildNodes()
htmlElement.cloneNode(deep)
Param | Type |
---|---|
deep | boolean |
htmlElement.appendChild(child)
Param | Type |
---|---|
child | Node |
htmlElement.insertBefore(child, before)
Param | Type |
---|---|
child | Node |
before | Node |
htmlElement.replaceChild(newChild, oldChild)
Param | Type |
---|---|
newChild | Node |
oldChild | Node |
htmlElement.removeChild(child)
Param | Type |
---|---|
child | Node |
htmlElement.remove()
htmlElement.before(...nodes)
Param | Type |
---|---|
...nodes | Array.<Node> |
htmlElement.after(...nodes)
Param | Type |
---|---|
...nodes | Array.<Node> |
htmlElement.replaceWith(...nodes)
Param | Type |
---|---|
...nodes | Array.<Node> |
htmlElement.contains(node)
Param | Type |
---|---|
node | Node |
htmlElement.addEventListener(eventName, callback, [capture])
Param | Type | Default |
---|---|---|
eventName | * |
|
callback | * |
|
[capture] | boolean |
false |
htmlElement.removeEventListener(eventName, callback, [capture])
Param | Type | Default |
---|---|---|
eventName | * |
|
callback | * |
|
[capture] | boolean |
false |
htmlElement.dispatchEvent(event)
Param | Type |
---|---|
event | * |