Edit in GitHubLog an issue

window.HTMLTextAreaElement

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

value : string

innerHTML : string

Override implementation in base class Element

defaultValue : string

The defaultValue for the textarea element

placeholder : string

readOnly : boolean

selectionStart : number

Returns/Sets the beginning index of the selected text. When nothing is selected, this returns the position of the text input cursor (caret) inside of the <textarea> element.

selectionEnd : number

Returns/Sets the end index of the selected text. When there's no selection, this returns the offset of the character immediately following the current text input cursor position.

dataset

Access to all the custom data attributes (data-*) set.

See: HTMLElement - dataset

innerText : string

lang : string

Base language of an element's attribute values and text content.

See: HTMLElement - lang

dir : string

The text writing directionality of the content of the current element limited to only known values.

See: HTMLElement - dir
Since: v7.1

hidden : boolean | string

Indicates the browser should not render the contents of the element. Note: "until-found" is not supported.

See: HTMLElement - hidden, Spec - hidden attribute

nodeName : string

Read only

localName : string

Read only A string representing the local part of the qualified name of the element

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

tagName : string

Read only A string indicating the element's tag name

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

nodeType : number

Read only

namespaceURI : string

Read only Returns the namespace URI of the element, or null if the element is not in a namespace.

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

id : string

Returns the property of the Element interface represents the element's identifier, reflecting the id global attribute.

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

tabIndex : number

className : string

attributes : NamedNodeMap

Read only

style : Style

Read only

clientLeft : number

Read only

clientTop : number

Read only

clientWidth : number

Read only

clientHeight : number

Read only

offsetParent : Element

Read only

offsetLeft : number

Read only

offsetTop : number

Read only

offsetWidth : number

Read only

offsetHeight : number

Read only

scrollLeft : number

scrollTop : number

scrollWidth : number

Read only

scrollHeight : number

Read only

autofocus : boolean

Indicates if the element will focus automatically when it is loaded

uxpContainer : number

Read only

shadowRoot : ShadowRoot

Read only [ This feature is behind a feature flag. You must turn on enableSWCSupport in the featureFlags section of plugin manifest to use the same ]

Returns the open shadow root that is hosted by the element, or null if no open shadow root is present.

See: Element - shadowRoot

disabled : boolean

outerHTML : string

slot : string

[ This feature is behind a feature flag. You must turn on enableSWCSupport in the featureFlags section of plugin manifest to use the same ]

See: Element - slot

assignedSlot : HTMLSlotElement

Read only [ This feature is behind a feature flag. You must turn on enableSWCSupport in the featureFlags section of plugin manifest to use the same ]

See: Element - assignedSlot

contentEditable

Read only

isConnected : boolean

Read only

parentNode : Node

Read only

parentElement : Element

Read only

firstChild : Node

Read only

lastChild : Node

Read only

previousSibling : Node

Read only

nextSibling : Node

Read only

firstElementChild : Node

Read only

lastElementChild : Node

Read only

previousElementSibling : Node

Read only

nextElementSibling : Node

Read only

textContent : string

childNodes : NodeList

Read only

children : HTMLCollection

Read only

ownerDocument

Read only

scrollTo(xOrOptions, y)

Scrolls the element to the new x and y positions. If options object is used with behavior: "smooth" then the element is smoothly scrolled.

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

ParamTypeDescription
xOrOptions
*
either the new scrollLeft position or an options object.
y
*
the optional new scrollTop position.

scrollIntoView(alignToTop)

ParamType
alignToTop
boolean

scrollIntoViewIfNeeded()

attachShadow(init)

[ This feature is behind a feature flag. You must turn on enableSWCSupport in the featureFlags section of plugin manifest to use the same ]

Attaches a shadow DOM tree to the specified element and returns a reference to its ShadowRoot.

Returns: ShadowRoot
See: Element - attachShadow

ParamDescription
init
An object which contains the fields : mode(open/closed) , delegatesFocus ,slotAssignment

focus()

blur()

getAttribute(name)

Returns: string
See: https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute

ParamTypeDescription
name
string
Name of the attribute whose value you want to get.

setAttribute(name, value)

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

ParamTypeDescription
name
string
Name of the attribute whose value is to be set
value
string
Value to assign to the attribute

removeAttribute(name)

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

ParamType
name
string

hasAttribute(name)

Returns: boolean
See: https://developer.mozilla.org/en-US/docs/Web/API/Element/hasAttribute

ParamType
name
string

hasAttributes()

Returns a boolean value indicating whether the current element has any attributes or not.

Returns: boolean
See: https://developer.mozilla.org/en-US/docs/Web/API/Element/hasAttributes

getAttributeNames()

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

Returns: Array
See: https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNames

getAttributeNode(name)

Returns: *
See: https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNode

ParamType
name
string

setAttributeNode(newAttr)

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

ParamType
newAttr
*

removeAttributeNode(oldAttr)

ParamType
oldAttr
*

click()

getElementsByClassName(name)

Returns: NodeList

ParamType
name
string

getElementsByTagName(name)

Returns: NodeList

ParamType
name
string

querySelector(selector)

Returns: Element

ParamType
selector
string

querySelectorAll(selector)

Returns: NodeList

ParamType
selector
string

setPointerCapture(pointerId)

Sets pointer capture for the element. This implementation does not dispatch the gotpointercapture event on the element.

Throws:

  • DOMException If the element is not connected to the DOM.

See: Element - setPointerCapture
Since: v7.1

ParamTypeDescription
pointerId
number
The unique identifier of the pointer to be captured.

Example

Copied to your clipboard
1// HTML
2<style>
3 div {
4 width: 140px;
5 height: 50px;
6 display: flex;
7 align-items: center;
8 justify-content: center;
9 background: #fbe;
10 position: absolute;
11 }
12</style>
13<div id="slider">SLIDE ME</div>
14
15// JS
16function beginSliding(e) {
17 slider.setPointerCapture(e.pointerId);
18 slider.addEventListener("pointermove", slide);
19 }
20
21 function stopSliding(e) {
22 slider.releasePointerCapture(e.pointerId);
23 slider.removeEventListener("pointermove", slide);
24 }
25
26 function slide(e) {
27 slider.style.left = e.clientX;
28 }
29
30 const slider = document.getElementById("slider");
31
32 slider.addEventListener("pointerdown", beginSliding);
33 slider.addEventListener("pointerup", stopSliding);

releasePointerCapture(pointerId)

Releases pointer capture for the element. This implementation does not dispatch the lostpointercapture event on the element.

See: Element - releasePointerCapture
Since: v7.1

ParamTypeDescription
pointerId
number
The unique identifier of the pointer to be released.

hasPointerCapture(pointerId)

Checks if the element has pointer capture for the specified pointer.

Returns: boolean - True if the element has pointer capture for the specified pointer, false otherwise.
See: Element - hasPointerCapture
Since: v7.1

ParamTypeDescription
pointerId
number
The unique identifier of the pointer to check.

getBoundingClientRect()

Returns: *

closest(selectorString)

Returns: Element
See: https://developer.mozilla.org/en-US/docs/Web/API/Element/closest

ParamType
selectorString
string

matches(selectorString)

Returns: boolean
See: https://developer.mozilla.org/en-US/docs/Web/API/Element/matches

ParamType
selectorString
string

insertAdjacentHTML(position, value)

ParamType
position
value
string

insertAdjacentElement(position, node)

Returns: Node

ParamType
position
*
node
*

insertAdjacentText(position, text)

ParamType
position
*
text
*

hasChildNodes()

Returns: boolean

cloneNode(deep)

Returns: Node

ParamType
deep
boolean

appendChild(child)

Returns: Node

ParamType
child
Node

insertBefore(child, before)

Returns: Node

ParamType
child
Node
before
Node

replaceChild(newChild, oldChild)

Returns: Node

ParamType
newChild
Node
oldChild
Node

removeChild(child)

Returns: Node

ParamType
child
Node

remove()

before(...nodes)

ParamType
...nodes
Array<Node>

after(...nodes)

ParamType
...nodes
Array<Node>

replaceWith(...nodes)

ParamType
...nodes
Array<Node>

contains(node)

ParamType
node
Node

getRootNode(options)

Returns: Node - root node

ParamType
options
Object

addEventListener(eventName, callback, options)

See: EventTarget - addEventListener

ParamTypeDescription
eventName
*
callback
*
options
boolean | Object
Boolean value denoting capture value or options object. Currently supports only capture in options object ({ capture: bool_value }).

removeEventListener(eventName, callback, options)

See: EventTarget - removeEventListener

ParamTypeDescription
eventName
*
callback
*
options
boolean | Object
Boolean value denoting capture value or options object. Currently supports only capture in options object ({ capture: bool_value }).

dispatchEvent(event)

ParamType
event
*
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.