Provides special properties and methods for manipulating the options, layout, and presentation of elements.

interface HTMLInputElement {
    ATTRIBUTE_NODE: number;
    CDATA_SECTION_NODE: number;
    COMMENT_NODE: number;
    DOCUMENT_FRAGMENT_NODE: number;
    DOCUMENT_NODE: number;
    DOCUMENT_POSITION_CONTAINED_BY: number;
    DOCUMENT_POSITION_CONTAINS: number;
    DOCUMENT_POSITION_DISCONNECTED: number;
    DOCUMENT_POSITION_FOLLOWING: number;
    DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
    DOCUMENT_POSITION_PRECEDING: number;
    DOCUMENT_TYPE_NODE: number;
    ELEMENT_NODE: number;
    ENTITY_NODE: number;
    ENTITY_REFERENCE_NODE: number;
    NOTATION_NODE: number;
    PROCESSING_INSTRUCTION_NODE: number;
    TEXT_NODE: number;
    accept: string;
    accessKey: string;
    accessKeyLabel: string;
    align: string;
    alt: string;
    ariaAtomic: null | string;
    ariaAutoComplete: null | string;
    ariaBusy: null | string;
    ariaChecked: null | string;
    ariaColCount: null | string;
    ariaColIndex: null | string;
    ariaColIndexText: null | string;
    ariaColSpan: null | string;
    ariaCurrent: null | string;
    ariaDisabled: null | string;
    ariaExpanded: null | string;
    ariaHasPopup: null | string;
    ariaHidden: null | string;
    ariaInvalid: null | string;
    ariaKeyShortcuts: null | string;
    ariaLabel: null | string;
    ariaLevel: null | string;
    ariaLive: null | string;
    ariaModal: null | string;
    ariaMultiLine: null | string;
    ariaMultiSelectable: null | string;
    ariaOrientation: null | string;
    ariaPlaceholder: null | string;
    ariaPosInSet: null | string;
    ariaPressed: null | string;
    ariaReadOnly: null | string;
    ariaRequired: null | string;
    ariaRoleDescription: null | string;
    ariaRowCount: null | string;
    ariaRowIndex: null | string;
    ariaRowIndexText: null | string;
    ariaRowSpan: null | string;
    ariaSelected: null | string;
    ariaSetSize: null | string;
    ariaSort: null | string;
    ariaValueMax: null | string;
    ariaValueMin: null | string;
    ariaValueNow: null | string;
    ariaValueText: null | string;
    assignedSlot: null | HTMLSlotElement;
    attributes: NamedNodeMap;
    autocapitalize: string;
    autocomplete: string;
    autofocus: boolean;
    baseURI: string;
    capture: string;
    checked: boolean;
    childElementCount: number;
    childNodes: NodeListOf<ChildNode>;
    children: HTMLCollection;
    classList: DOMTokenList;
    className: string;
    clientHeight: number;
    clientLeft: number;
    clientTop: number;
    clientWidth: number;
    contentEditable: string;
    dataset: DOMStringMap;
    defaultChecked: boolean;
    defaultValue: string;
    dir: string;
    dirName: string;
    disabled: boolean;
    draggable: boolean;
    enterKeyHint: string;
    files: null | FileList;
    firstChild: null | ChildNode;
    firstElementChild: null | Element;
    form: null | HTMLFormElement;
    formAction: string;
    formEnctype: string;
    formMethod: string;
    formNoValidate: boolean;
    formTarget: string;
    height: number;
    hidden: boolean;
    id: string;
    indeterminate: boolean;
    inert: boolean;
    innerHTML: string;
    innerText: string;
    inputMode: string;
    isConnected: boolean;
    isContentEditable: boolean;
    labels: null | NodeListOf<HTMLLabelElement>;
    lang: string;
    lastChild: null | ChildNode;
    lastElementChild: null | Element;
    list: null | HTMLElement;
    localName: string;
    max: string;
    maxLength: number;
    min: string;
    minLength: number;
    multiple: boolean;
    name: string;
    namespaceURI: null | string;
    nextElementSibling: null | Element;
    nextSibling: null | ChildNode;
    nodeName: string;
    nodeType: number;
    nodeValue: null | string;
    nonce?: string;
    offsetHeight: number;
    offsetLeft: number;
    offsetParent: null | Element;
    offsetTop: number;
    offsetWidth: number;
    onabort: null | ((this, ev) => any);
    onanimationcancel: null | ((this, ev) => any);
    onanimationend: null | ((this, ev) => any);
    onanimationiteration: null | ((this, ev) => any);
    onanimationstart: null | ((this, ev) => any);
    onauxclick: null | ((this, ev) => any);
    onbeforeinput: null | ((this, ev) => any);
    onblur: null | ((this, ev) => any);
    oncancel: null | ((this, ev) => any);
    oncanplay: null | ((this, ev) => any);
    oncanplaythrough: null | ((this, ev) => any);
    onchange: null | ((this, ev) => any);
    onclick: null | ((this, ev) => any);
    onclose: null | ((this, ev) => any);
    oncontextmenu: null | ((this, ev) => any);
    oncopy: null | ((this, ev) => any);
    oncuechange: null | ((this, ev) => any);
    oncut: null | ((this, ev) => any);
    ondblclick: null | ((this, ev) => any);
    ondrag: null | ((this, ev) => any);
    ondragend: null | ((this, ev) => any);
    ondragenter: null | ((this, ev) => any);
    ondragleave: null | ((this, ev) => any);
    ondragover: null | ((this, ev) => any);
    ondragstart: null | ((this, ev) => any);
    ondrop: null | ((this, ev) => any);
    ondurationchange: null | ((this, ev) => any);
    onemptied: null | ((this, ev) => any);
    onended: null | ((this, ev) => any);
    onerror: OnErrorEventHandler;
    onfocus: null | ((this, ev) => any);
    onformdata: null | ((this, ev) => any);
    onfullscreenchange: null | ((this, ev) => any);
    onfullscreenerror: null | ((this, ev) => any);
    ongotpointercapture: null | ((this, ev) => any);
    oninput: null | ((this, ev) => any);
    oninvalid: null | ((this, ev) => any);
    onkeydown: null | ((this, ev) => any);
    onkeypress: null | ((this, ev) => any);
    onkeyup: null | ((this, ev) => any);
    onload: null | ((this, ev) => any);
    onloadeddata: null | ((this, ev) => any);
    onloadedmetadata: null | ((this, ev) => any);
    onloadstart: null | ((this, ev) => any);
    onlostpointercapture: null | ((this, ev) => any);
    onmousedown: null | ((this, ev) => any);
    onmouseenter: null | ((this, ev) => any);
    onmouseleave: null | ((this, ev) => any);
    onmousemove: null | ((this, ev) => any);
    onmouseout: null | ((this, ev) => any);
    onmouseover: null | ((this, ev) => any);
    onmouseup: null | ((this, ev) => any);
    onpaste: null | ((this, ev) => any);
    onpause: null | ((this, ev) => any);
    onplay: null | ((this, ev) => any);
    onplaying: null | ((this, ev) => any);
    onpointercancel: null | ((this, ev) => any);
    onpointerdown: null | ((this, ev) => any);
    onpointerenter: null | ((this, ev) => any);
    onpointerleave: null | ((this, ev) => any);
    onpointermove: null | ((this, ev) => any);
    onpointerout: null | ((this, ev) => any);
    onpointerover: null | ((this, ev) => any);
    onpointerup: null | ((this, ev) => any);
    onprogress: null | ((this, ev) => any);
    onratechange: null | ((this, ev) => any);
    onreset: null | ((this, ev) => any);
    onresize: null | ((this, ev) => any);
    onscroll: null | ((this, ev) => any);
    onsecuritypolicyviolation: null | ((this, ev) => any);
    onseeked: null | ((this, ev) => any);
    onseeking: null | ((this, ev) => any);
    onselect: null | ((this, ev) => any);
    onselectionchange: null | ((this, ev) => any);
    onselectstart: null | ((this, ev) => any);
    onslotchange: null | ((this, ev) => any);
    onstalled: null | ((this, ev) => any);
    onsubmit: null | ((this, ev) => any);
    onsuspend: null | ((this, ev) => any);
    ontimeupdate: null | ((this, ev) => any);
    ontoggle: null | ((this, ev) => any);
    ontouchcancel?: null | ((this, ev) => any);
    ontouchend?: null | ((this, ev) => any);
    ontouchmove?: null | ((this, ev) => any);
    ontouchstart?: null | ((this, ev) => any);
    ontransitioncancel: null | ((this, ev) => any);
    ontransitionend: null | ((this, ev) => any);
    ontransitionrun: null | ((this, ev) => any);
    ontransitionstart: null | ((this, ev) => any);
    onvolumechange: null | ((this, ev) => any);
    onwaiting: null | ((this, ev) => any);
    onwebkitanimationend: null | ((this, ev) => any);
    onwebkitanimationiteration: null | ((this, ev) => any);
    onwebkitanimationstart: null | ((this, ev) => any);
    onwebkittransitionend: null | ((this, ev) => any);
    onwheel: null | ((this, ev) => any);
    outerHTML: string;
    outerText: string;
    ownerDocument: Document;
    parentElement: null | HTMLElement;
    parentNode: null | ParentNode;
    part: DOMTokenList;
    pattern: string;
    placeholder: string;
    prefix: null | string;
    previousElementSibling: null | Element;
    previousSibling: null | ChildNode;
    readOnly: boolean;
    required: boolean;
    role: null | string;
    scrollHeight: number;
    scrollLeft: number;
    scrollTop: number;
    scrollWidth: number;
    selectionDirection: null | "none" | "forward" | "backward";
    selectionEnd: null | number;
    selectionStart: null | number;
    shadowRoot: null | ShadowRoot;
    size: number;
    slot: string;
    spellcheck: boolean;
    src: string;
    step: string;
    style: CSSStyleDeclaration;
    tabIndex: number;
    tagName: string;
    textContent: null | string;
    title: string;
    translate: boolean;
    type: string;
    useMap: string;
    validationMessage: string;
    validity: ValidityState;
    value: string;
    valueAsDate: null | Date;
    valueAsNumber: number;
    webkitEntries: readonly FileSystemEntry[];
    webkitdirectory: boolean;
    width: number;
    willValidate: boolean;
    addEventListener<K>(type, listener, options?): void;
    addEventListener(type, listener, options?): void;
    after(...nodes): void;
    animate(keyframes, options?): Animation;
    append(...nodes): void;
    appendChild<T>(node): T;
    attachInternals(): ElementInternals;
    attachShadow(init): ShadowRoot;
    before(...nodes): void;
    blur(): void;
    checkValidity(): boolean;
    click(): void;
    cloneNode(deep?): Node;
    closest<K>(selector): null | HTMLElementTagNameMap[K];
    closest<K>(selector): null | SVGElementTagNameMap[K];
    closest<E>(selectors): null | E;
    compareDocumentPosition(other): number;
    contains(other): boolean;
    dispatchEvent(event): boolean;
    focus(options?): void;
    getAnimations(options?): Animation[];
    getAttribute(qualifiedName): null | string;
    getAttributeNS(namespace, localName): null | string;
    getAttributeNames(): string[];
    getAttributeNode(qualifiedName): null | Attr;
    getAttributeNodeNS(namespace, localName): null | Attr;
    getBoundingClientRect(): DOMRect;
    getClientRects(): DOMRectList;
    getElementsByClassName(classNames): HTMLCollectionOf<Element>;
    getElementsByTagName<K>(qualifiedName): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
    getElementsByTagName<K>(qualifiedName): HTMLCollectionOf<SVGElementTagNameMap[K]>;
    getElementsByTagName(qualifiedName): HTMLCollectionOf<Element>;
    getElementsByTagNameNS(namespaceURI, localName): HTMLCollectionOf<HTMLElement>;
    getElementsByTagNameNS(namespaceURI, localName): HTMLCollectionOf<SVGElement>;
    getElementsByTagNameNS(namespace, localName): HTMLCollectionOf<Element>;
    getRootNode(options?): Node;
    hasAttribute(qualifiedName): boolean;
    hasAttributeNS(namespace, localName): boolean;
    hasAttributes(): boolean;
    hasChildNodes(): boolean;
    hasPointerCapture(pointerId): boolean;
    insertAdjacentElement(where, element): null | Element;
    insertAdjacentHTML(position, text): void;
    insertAdjacentText(where, data): void;
    insertBefore<T>(node, child): T;
    isDefaultNamespace(namespace): boolean;
    isEqualNode(otherNode): boolean;
    isSameNode(otherNode): boolean;
    lookupNamespaceURI(prefix): null | string;
    lookupPrefix(namespace): null | string;
    matches(selectors): boolean;
    normalize(): void;
    prepend(...nodes): void;
    querySelector<K>(selectors): null | HTMLElementTagNameMap[K];
    querySelector<K>(selectors): null | SVGElementTagNameMap[K];
    querySelector<E>(selectors): null | E;
    querySelectorAll<K>(selectors): NodeListOf<HTMLElementTagNameMap[K]>;
    querySelectorAll<K>(selectors): NodeListOf<SVGElementTagNameMap[K]>;
    querySelectorAll<E>(selectors): NodeListOf<E>;
    releasePointerCapture(pointerId): void;
    remove(): void;
    removeAttribute(qualifiedName): void;
    removeAttributeNS(namespace, localName): void;
    removeAttributeNode(attr): Attr;
    removeChild<T>(child): T;
    removeEventListener<K>(type, listener, options?): void;
    removeEventListener(type, listener, options?): void;
    replaceChild<T>(node, child): T;
    replaceChildren(...nodes): void;
    replaceWith(...nodes): void;
    reportValidity(): boolean;
    requestFullscreen(options?): Promise<void>;
    requestPointerLock(): void;
    scroll(options?): void;
    scroll(x, y): void;
    scrollBy(options?): void;
    scrollBy(x, y): void;
    scrollIntoView(arg?): void;
    scrollTo(options?): void;
    scrollTo(x, y): void;
    select(): void;
    setAttribute(qualifiedName, value): void;
    setAttributeNS(namespace, qualifiedName, value): void;
    setAttributeNode(attr): null | Attr;
    setAttributeNodeNS(attr): null | Attr;
    setCustomValidity(error): void;
    setPointerCapture(pointerId): void;
    setRangeText(replacement): void;
    setRangeText(replacement, start, end, selectionMode?): void;
    setSelectionRange(start, end, direction?): void;
    showPicker(): void;
    stepDown(n?): void;
    stepUp(n?): void;
    toggleAttribute(qualifiedName, force?): boolean;
    webkitMatchesSelector(selectors): boolean;
}

Hierarchy (view full)

Properties

ATTRIBUTE_NODE CDATA_SECTION_NODE COMMENT_NODE DOCUMENT_FRAGMENT_NODE DOCUMENT_NODE DOCUMENT_POSITION_CONTAINED_BY DOCUMENT_POSITION_CONTAINS DOCUMENT_POSITION_DISCONNECTED DOCUMENT_POSITION_FOLLOWING DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC DOCUMENT_POSITION_PRECEDING DOCUMENT_TYPE_NODE ELEMENT_NODE ENTITY_NODE ENTITY_REFERENCE_NODE NOTATION_NODE PROCESSING_INSTRUCTION_NODE TEXT_NODE accept accessKey accessKeyLabel align alt ariaAtomic ariaAutoComplete ariaBusy ariaChecked ariaColCount ariaColIndex ariaColIndexText ariaColSpan ariaCurrent ariaDisabled ariaExpanded ariaHasPopup ariaHidden ariaInvalid ariaKeyShortcuts ariaLabel ariaLevel ariaLive ariaModal ariaMultiLine ariaMultiSelectable ariaOrientation ariaPlaceholder ariaPosInSet ariaPressed ariaReadOnly ariaRequired ariaRoleDescription ariaRowCount ariaRowIndex ariaRowIndexText ariaRowSpan ariaSelected ariaSetSize ariaSort ariaValueMax ariaValueMin ariaValueNow ariaValueText assignedSlot attributes autocapitalize autocomplete autofocus baseURI capture checked childElementCount childNodes children classList className clientHeight clientLeft clientTop clientWidth contentEditable dataset defaultChecked defaultValue dir dirName disabled draggable enterKeyHint files firstChild firstElementChild form formAction formEnctype formMethod formNoValidate formTarget height hidden id indeterminate inert innerHTML innerText inputMode isConnected isContentEditable labels lang lastChild lastElementChild list localName max maxLength min minLength multiple name namespaceURI nextElementSibling nextSibling nodeName nodeType nodeValue nonce? offsetHeight offsetLeft offsetParent offsetTop offsetWidth onabort onanimationcancel onanimationend onanimationiteration onanimationstart onauxclick onbeforeinput onblur oncancel oncanplay oncanplaythrough onchange onclick onclose oncontextmenu oncopy oncuechange oncut ondblclick ondrag ondragend ondragenter ondragleave ondragover ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformdata onfullscreenchange onfullscreenerror ongotpointercapture oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata onloadedmetadata onloadstart onlostpointercapture onmousedown onmouseenter onmouseleave onmousemove onmouseout onmouseover onmouseup onpaste onpause onplay onplaying onpointercancel onpointerdown onpointerenter onpointerleave onpointermove onpointerout onpointerover onpointerup onprogress onratechange onreset onresize onscroll onsecuritypolicyviolation onseeked onseeking onselect onselectionchange onselectstart onslotchange onstalled onsubmit onsuspend ontimeupdate ontoggle ontouchcancel? ontouchend? ontouchmove? ontouchstart? ontransitioncancel ontransitionend ontransitionrun ontransitionstart onvolumechange onwaiting onwebkitanimationend onwebkitanimationiteration onwebkitanimationstart onwebkittransitionend onwheel outerHTML outerText ownerDocument parentElement parentNode part pattern placeholder prefix previousElementSibling previousSibling readOnly required role scrollHeight scrollLeft scrollTop scrollWidth selectionDirection selectionEnd selectionStart shadowRoot size slot spellcheck src step style tabIndex tagName textContent title translate type useMap validationMessage validity value valueAsDate valueAsNumber webkitEntries webkitdirectory width willValidate

Methods

Properties

ATTRIBUTE_NODE: number
CDATA_SECTION_NODE: number

node is a CDATASection node.

COMMENT_NODE: number

node is a Comment node.

DOCUMENT_FRAGMENT_NODE: number

node is a DocumentFragment node.

DOCUMENT_NODE: number

node is a document.

DOCUMENT_POSITION_CONTAINED_BY: number

Set when other is a descendant of node.

DOCUMENT_POSITION_CONTAINS: number

Set when other is an ancestor of node.

DOCUMENT_POSITION_DISCONNECTED: number

Set when node and other are not in the same tree.

DOCUMENT_POSITION_FOLLOWING: number

Set when other is following node.

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number
DOCUMENT_POSITION_PRECEDING: number

Set when other is preceding node.

DOCUMENT_TYPE_NODE: number

node is a doctype.

ELEMENT_NODE: number

node is an element.

ENTITY_NODE: number
ENTITY_REFERENCE_NODE: number
NOTATION_NODE: number
PROCESSING_INSTRUCTION_NODE: number

node is a ProcessingInstruction node.

TEXT_NODE: number

node is a Text node.

accept: string

Sets or retrieves a comma-separated list of content types.

accessKey: string
accessKeyLabel: string
align: string

Sets or retrieves how the object is aligned with adjacent text.

Deprecated

alt: string

Sets or retrieves a text alternative to the graphic.

ariaAtomic: null | string
ariaAutoComplete: null | string
ariaBusy: null | string
ariaChecked: null | string
ariaColCount: null | string
ariaColIndex: null | string
ariaColIndexText: null | string
ariaColSpan: null | string
ariaCurrent: null | string
ariaDisabled: null | string
ariaExpanded: null | string
ariaHasPopup: null | string
ariaHidden: null | string
ariaInvalid: null | string
ariaKeyShortcuts: null | string
ariaLabel: null | string
ariaLevel: null | string
ariaLive: null | string
ariaModal: null | string
ariaMultiLine: null | string
ariaMultiSelectable: null | string
ariaOrientation: null | string
ariaPlaceholder: null | string
ariaPosInSet: null | string
ariaPressed: null | string
ariaReadOnly: null | string
ariaRequired: null | string
ariaRoleDescription: null | string
ariaRowCount: null | string
ariaRowIndex: null | string
ariaRowIndexText: null | string
ariaRowSpan: null | string
ariaSelected: null | string
ariaSetSize: null | string
ariaSort: null | string
ariaValueMax: null | string
ariaValueMin: null | string
ariaValueNow: null | string
ariaValueText: null | string
assignedSlot: null | HTMLSlotElement
attributes: NamedNodeMap
autocapitalize: string
autocomplete: string

Specifies whether autocomplete is applied to an editable text field.

autofocus: boolean
baseURI: string

Returns node's node document's document base URL.

capture: string
checked: boolean

Sets or retrieves the state of the check box or radio button.

childElementCount: number
childNodes: NodeListOf<ChildNode>

Returns the children.

children: HTMLCollection

Returns the child elements.

classList: DOMTokenList

Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object.

className: string

Returns the value of element's class content attribute. Can be set to change it.

clientHeight: number
clientLeft: number
clientTop: number
clientWidth: number
contentEditable: string
dataset: DOMStringMap
defaultChecked: boolean

Sets or retrieves the state of the check box or radio button.

defaultValue: string

Sets or retrieves the initial contents of the object.

dir: string
dirName: string
disabled: boolean
draggable: boolean
enterKeyHint: string
files: null | FileList

Returns a FileList object on a file type input object.

firstChild: null | ChildNode

Returns the first child.

firstElementChild: null | Element

Returns the first child that is an element, and null otherwise.

form: null | HTMLFormElement

Retrieves a reference to the form that the object is embedded in.

formAction: string

Overrides the action attribute (where the data on a form is sent) on the parent form element.

formEnctype: string

Used to override the encoding (formEnctype attribute) specified on the form element.

formMethod: string

Overrides the submit method attribute previously specified on a form element.

formNoValidate: boolean

Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.

formTarget: string

Overrides the target attribute on a form element.

height: number

Sets or retrieves the height of the object.

hidden: boolean
id: string

Returns the value of element's id content attribute. Can be set to change it.

indeterminate: boolean

When set, overrides the rendering of checkbox controls so that the current value is not visible.

inert: boolean
innerHTML: string
innerText: string
inputMode: string
isConnected: boolean

Returns true if node is connected and false otherwise.

isContentEditable: boolean
labels: null | NodeListOf<HTMLLabelElement>
lang: string
lastChild: null | ChildNode

Returns the last child.

lastElementChild: null | Element

Returns the last child that is an element, and null otherwise.

list: null | HTMLElement

Specifies the ID of a pre-defined datalist of options for an input element.

localName: string

Returns the local name.

max: string

Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.

maxLength: number

Sets or retrieves the maximum number of characters that the user can enter in a text control.

min: string

Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.

minLength: number
multiple: boolean

Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.

name: string

Sets or retrieves the name of the object.

namespaceURI: null | string

Returns the namespace.

nextElementSibling: null | Element

Returns the first following sibling that is an element, and null otherwise.

nextSibling: null | ChildNode

Returns the next sibling.

nodeName: string

Returns a string appropriate for the type of node.

nodeType: number

Returns the type of node.

nodeValue: null | string
nonce?: string
offsetHeight: number
offsetLeft: number
offsetParent: null | Element
offsetTop: number
offsetWidth: number
onabort: null | ((this, ev) => any)

Fires when the user aborts the download.

Type declaration

Param: ev

The event.

onanimationcancel: null | ((this, ev) => any)

Type declaration

onanimationend: null | ((this, ev) => any)

Type declaration

onanimationiteration: null | ((this, ev) => any)

Type declaration

onanimationstart: null | ((this, ev) => any)

Type declaration

onauxclick: null | ((this, ev) => any)

Type declaration

onbeforeinput: null | ((this, ev) => any)

Type declaration

onblur: null | ((this, ev) => any)

Fires when the object loses the input focus.

Type declaration

Param: ev

The focus event.

oncancel: null | ((this, ev) => any)

Type declaration

oncanplay: null | ((this, ev) => any)

Occurs when playback is possible, but would require further buffering.

Type declaration

Param: ev

The event.

oncanplaythrough: null | ((this, ev) => any)

Type declaration

onchange: null | ((this, ev) => any)

Fires when the contents of the object or selection have changed.

Type declaration

Param: ev

The event.

onclick: null | ((this, ev) => any)

Fires when the user clicks the left mouse button on the object

Type declaration

Param: ev

The mouse event.

onclose: null | ((this, ev) => any)

Type declaration

oncontextmenu: null | ((this, ev) => any)

Fires when the user clicks the right mouse button in the client area, opening the context menu.

Type declaration

Param: ev

The mouse event.

oncopy: null | ((this, ev) => any)

Type declaration

oncuechange: null | ((this, ev) => any)

Type declaration

oncut: null | ((this, ev) => any)

Type declaration

ondblclick: null | ((this, ev) => any)

Fires when the user double-clicks the object.

Type declaration

Param: ev

The mouse event.

ondrag: null | ((this, ev) => any)

Fires on the source object continuously during a drag operation.

Type declaration

Param: ev

The event.

ondragend: null | ((this, ev) => any)

Fires on the source object when the user releases the mouse at the close of a drag operation.

Type declaration

Param: ev

The event.

ondragenter: null | ((this, ev) => any)

Fires on the target element when the user drags the object to a valid drop target.

Type declaration

Param: ev

The drag event.

ondragleave: null | ((this, ev) => any)

Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.

Type declaration

Param: ev

The drag event.

ondragover: null | ((this, ev) => any)

Fires on the target element continuously while the user drags the object over a valid drop target.

Type declaration

Param: ev

The event.

ondragstart: null | ((this, ev) => any)

Fires on the source object when the user starts to drag a text selection or selected object.

Type declaration

Param: ev

The event.

ondrop: null | ((this, ev) => any)

Type declaration

ondurationchange: null | ((this, ev) => any)

Occurs when the duration attribute is updated.

Type declaration

Param: ev

The event.

onemptied: null | ((this, ev) => any)

Occurs when the media element is reset to its initial state.

Type declaration

Param: ev

The event.

onended: null | ((this, ev) => any)

Occurs when the end of playback is reached.

Type declaration

Param: ev

The event

Fires when an error occurs during object loading.

Param: ev

The event.

onfocus: null | ((this, ev) => any)

Fires when the object receives focus.

Type declaration

Param: ev

The event.

onformdata: null | ((this, ev) => any)

Type declaration

onfullscreenchange: null | ((this, ev) => any)

Type declaration

    • (this, ev): any
    • Parameters

      Returns any

onfullscreenerror: null | ((this, ev) => any)

Type declaration

    • (this, ev): any
    • Parameters

      Returns any

ongotpointercapture: null | ((this, ev) => any)

Type declaration

oninput: null | ((this, ev) => any)

Type declaration

oninvalid: null | ((this, ev) => any)

Type declaration

onkeydown: null | ((this, ev) => any)

Fires when the user presses a key.

Type declaration

Param: ev

The keyboard event

onkeypress: null | ((this, ev) => any)

Fires when the user presses an alphanumeric key.

Type declaration

Param: ev

The event.

Deprecated

onkeyup: null | ((this, ev) => any)

Fires when the user releases a key.

Type declaration

Param: ev

The keyboard event

onload: null | ((this, ev) => any)

Fires immediately after the browser loads the object.

Type declaration

Param: ev

The event.

onloadeddata: null | ((this, ev) => any)

Occurs when media data is loaded at the current playback position.

Type declaration

Param: ev

The event.

onloadedmetadata: null | ((this, ev) => any)

Occurs when the duration and dimensions of the media have been determined.

Type declaration

Param: ev

The event.

onloadstart: null | ((this, ev) => any)

Occurs when Internet Explorer begins looking for media data.

Type declaration

Param: ev

The event.

onlostpointercapture: null | ((this, ev) => any)

Type declaration

onmousedown: null | ((this, ev) => any)

Fires when the user clicks the object with either mouse button.

Type declaration

Param: ev

The mouse event.

onmouseenter: null | ((this, ev) => any)

Type declaration

onmouseleave: null | ((this, ev) => any)

Type declaration

onmousemove: null | ((this, ev) => any)

Fires when the user moves the mouse over the object.

Type declaration

Param: ev

The mouse event.

onmouseout: null | ((this, ev) => any)

Fires when the user moves the mouse pointer outside the boundaries of the object.

Type declaration

Param: ev

The mouse event.

onmouseover: null | ((this, ev) => any)

Fires when the user moves the mouse pointer into the object.

Type declaration

Param: ev

The mouse event.

onmouseup: null | ((this, ev) => any)

Fires when the user releases a mouse button while the mouse is over the object.

Type declaration

Param: ev

The mouse event.

onpaste: null | ((this, ev) => any)

Type declaration

onpause: null | ((this, ev) => any)

Occurs when playback is paused.

Type declaration

Param: ev

The event.

onplay: null | ((this, ev) => any)

Occurs when the play method is requested.

Type declaration

Param: ev

The event.

onplaying: null | ((this, ev) => any)

Occurs when the audio or video has started playing.

Type declaration

Param: ev

The event.

onpointercancel: null | ((this, ev) => any)

Type declaration

onpointerdown: null | ((this, ev) => any)

Type declaration

onpointerenter: null | ((this, ev) => any)

Type declaration

onpointerleave: null | ((this, ev) => any)

Type declaration

onpointermove: null | ((this, ev) => any)

Type declaration

onpointerout: null | ((this, ev) => any)

Type declaration

onpointerover: null | ((this, ev) => any)

Type declaration

onpointerup: null | ((this, ev) => any)

Type declaration

onprogress: null | ((this, ev) => any)

Occurs to indicate progress while downloading media data.

Type declaration

Param: ev

The event.

onratechange: null | ((this, ev) => any)

Occurs when the playback rate is increased or decreased.

Type declaration

Param: ev

The event.

onreset: null | ((this, ev) => any)

Fires when the user resets a form.

Type declaration

Param: ev

The event.

onresize: null | ((this, ev) => any)

Type declaration

onscroll: null | ((this, ev) => any)

Fires when the user repositions the scroll box in the scroll bar on the object.

Type declaration

Param: ev

The event.

onsecuritypolicyviolation: null | ((this, ev) => any)

Type declaration

onseeked: null | ((this, ev) => any)

Occurs when the seek operation ends.

Type declaration

Param: ev

The event.

onseeking: null | ((this, ev) => any)

Occurs when the current playback position is moved.

Type declaration

Param: ev

The event.

onselect: null | ((this, ev) => any)

Fires when the current selection changes.

Type declaration

Param: ev

The event.

onselectionchange: null | ((this, ev) => any)

Type declaration

onselectstart: null | ((this, ev) => any)

Type declaration

onslotchange: null | ((this, ev) => any)

Type declaration

onstalled: null | ((this, ev) => any)

Occurs when the download has stopped.

Type declaration

Param: ev

The event.

onsubmit: null | ((this, ev) => any)

Type declaration

onsuspend: null | ((this, ev) => any)

Occurs if the load operation has been intentionally halted.

Type declaration

Param: ev

The event.

ontimeupdate: null | ((this, ev) => any)

Occurs to indicate the current playback position.

Type declaration

Param: ev

The event.

ontoggle: null | ((this, ev) => any)

Type declaration

ontouchcancel?: null | ((this, ev) => any)

Type declaration

ontouchend?: null | ((this, ev) => any)

Type declaration

ontouchmove?: null | ((this, ev) => any)

Type declaration

ontouchstart?: null | ((this, ev) => any)

Type declaration

ontransitioncancel: null | ((this, ev) => any)

Type declaration

ontransitionend: null | ((this, ev) => any)

Type declaration

ontransitionrun: null | ((this, ev) => any)

Type declaration

ontransitionstart: null | ((this, ev) => any)

Type declaration

onvolumechange: null | ((this, ev) => any)

Occurs when the volume is changed, or playback is muted or unmuted.

Type declaration

Param: ev

The event.

onwaiting: null | ((this, ev) => any)

Occurs when playback stops because the next frame of a video resource is not available.

Type declaration

Param: ev

The event.

onwebkitanimationend: null | ((this, ev) => any)

Type declaration

Deprecated

This is a legacy alias of onanimationend.

onwebkitanimationiteration: null | ((this, ev) => any)

Type declaration

Deprecated

This is a legacy alias of onanimationiteration.

onwebkitanimationstart: null | ((this, ev) => any)

Type declaration

Deprecated

This is a legacy alias of onanimationstart.

onwebkittransitionend: null | ((this, ev) => any)

Type declaration

Deprecated

This is a legacy alias of ontransitionend.

onwheel: null | ((this, ev) => any)

Type declaration

outerHTML: string
outerText: string
ownerDocument: Document

Returns the node document. Returns null for documents.

parentElement: null | HTMLElement

Returns the parent element.

parentNode: null | ParentNode

Returns the parent.

part: DOMTokenList
pattern: string

Gets or sets a string containing a regular expression that the user's input must match.

placeholder: string

Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.

prefix: null | string

Returns the namespace prefix.

previousElementSibling: null | Element

Returns the first preceding sibling that is an element, and null otherwise.

previousSibling: null | ChildNode

Returns the previous sibling.

readOnly: boolean
required: boolean

When present, marks an element that can't be submitted without a value.

role: null | string
scrollHeight: number
scrollLeft: number
scrollTop: number
scrollWidth: number
selectionDirection: null | "none" | "forward" | "backward"
selectionEnd: null | number

Gets or sets the end position or offset of a text selection.

selectionStart: null | number

Gets or sets the starting position or offset of a text selection.

shadowRoot: null | ShadowRoot

Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise.

size: number
slot: string

Returns the value of element's slot content attribute. Can be set to change it.

spellcheck: boolean
src: string

The address or URL of the a media resource that is to be considered.

step: string

Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.

style: CSSStyleDeclaration
tabIndex: number
tagName: string

Returns the HTML-uppercased qualified name.

textContent: null | string
title: string
translate: boolean
type: string

Returns the content type of the object.

useMap: string

Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.

Deprecated

validationMessage: string

Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.

validity: ValidityState

Returns a ValidityState object that represents the validity states of an element.

value: string

Returns the value of the data at the cursor's current position.

valueAsDate: null | Date

Returns a Date object representing the form control's value, if applicable; otherwise, returns null. Can be set, to change the value. Throws an "InvalidStateError" DOMException if the control isn't date- or time-based.

valueAsNumber: number

Returns the input field value as a number.

webkitEntries: readonly FileSystemEntry[]
webkitdirectory: boolean
width: number

Sets or retrieves the width of the object.

willValidate: boolean

Returns whether an element will successfully validate based on forms validation rules and constraints.

Methods

  • Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.

    The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.

    When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.

    When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.

    When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.

    If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.

    The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.

    Type Parameters

    Parameters

    Returns void

  • Parameters

    Returns void

  • Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes.

    Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

    Parameters

    • Rest ...nodes: (string | Node)[]

    Returns void

  • Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.

    Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

    Parameters

    • Rest ...nodes: (string | Node)[]

    Returns void

  • Type Parameters

    Parameters

    • node: T

    Returns T

  • Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.

    Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

    Parameters

    • Rest ...nodes: (string | Node)[]

    Returns void

  • Returns void

  • Returns whether a form will validate when it is submitted, without having to submit it.

    Returns boolean

  • Returns void

  • Returns a copy of node. If deep is true, the copy also includes the node's descendants.

    Parameters

    • Optional deep: boolean

    Returns Node

  • Returns a bitmask indicating the position of other relative to node.

    Parameters

    Returns number

  • Returns true if other is an inclusive descendant of node, and false otherwise.

    Parameters

    Returns boolean

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    Parameters

    • event: Event

    Returns boolean

  • Parameters

    Returns void

  • Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.

    Parameters

    • qualifiedName: string

    Returns null | string

  • Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise.

    Parameters

    • namespace: null | string
    • localName: string

    Returns null | string

  • Returns the qualified names of all element's attributes. Can contain duplicates.

    Returns string[]

  • Parameters

    • qualifiedName: string

    Returns null | Attr

  • Parameters

    • namespace: null | string
    • localName: string

    Returns null | Attr

  • Returns DOMRectList

  • Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.

    Parameters

    • classNames: string

    Returns HTMLCollectionOf<Element>

  • Parameters

    • namespaceURI: "http://www.w3.org/1999/xhtml"
    • localName: string

    Returns HTMLCollectionOf<HTMLElement>

  • Parameters

    • namespaceURI: "http://www.w3.org/2000/svg"
    • localName: string

    Returns HTMLCollectionOf<SVGElement>

  • Parameters

    • namespace: null | string
    • localName: string

    Returns HTMLCollectionOf<Element>

  • Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.

    Parameters

    • qualifiedName: string

    Returns boolean

  • Returns true if element has an attribute whose namespace is namespace and local name is localName.

    Parameters

    • namespace: null | string
    • localName: string

    Returns boolean

  • Returns true if element has attributes, and false otherwise.

    Returns boolean

  • Returns whether node has children.

    Returns boolean

  • Parameters

    • pointerId: number

    Returns boolean

  • Type Parameters

    Parameters

    • node: T
    • child: null | Node

    Returns T

  • Parameters

    • namespace: null | string

    Returns boolean

  • Returns whether node and otherNode have the same properties.

    Parameters

    • otherNode: null | Node

    Returns boolean

  • Parameters

    • otherNode: null | Node

    Returns boolean

  • Parameters

    • prefix: null | string

    Returns null | string

  • Parameters

    • namespace: null | string

    Returns null | string

  • Returns true if matching selectors against element's root yields element, and false otherwise.

    Parameters

    • selectors: string

    Returns boolean

  • Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.

    Returns void

  • Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.

    Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

    Parameters

    • Rest ...nodes: (string | Node)[]

    Returns void

  • Parameters

    • pointerId: number

    Returns void

  • Removes node.

    Returns void

  • Removes element's first attribute whose qualified name is qualifiedName.

    Parameters

    • qualifiedName: string

    Returns void

  • Removes element's attribute whose namespace is namespace and local name is localName.

    Parameters

    • namespace: null | string
    • localName: string

    Returns void

  • Type Parameters

    Parameters

    • child: T

    Returns T

  • Type Parameters

    Parameters

    Returns T

  • Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.

    Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

    Parameters

    • Rest ...nodes: (string | Node)[]

    Returns void

  • Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.

    Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

    Parameters

    • Rest ...nodes: (string | Node)[]

    Returns void

  • Returns boolean

  • Displays element fullscreen and resolves promise when done.

    When supplied, options's navigationUI member indicates whether showing navigation UI while in fullscreen is preferred or not. If set to "show", navigation simplicity is preferred over screen space, and if set to "hide", more screen space is preferred. User agents are always free to honor user preference over the application's. The default value "auto" indicates no application preference.

    Parameters

    Returns Promise<void>

  • Parameters

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    Returns void

  • Parameters

    • x: number
    • y: number

    Returns void

  • Makes the selection equal to the current object.

    Returns void

  • Sets the value of element's first attribute whose qualified name is qualifiedName to value.

    Parameters

    • qualifiedName: string
    • value: string

    Returns void

  • Sets the value of element's attribute whose namespace is namespace and local name is localName to value.

    Parameters

    • namespace: null | string
    • qualifiedName: string
    • value: string

    Returns void

  • Sets a custom error message that is displayed when a form is submitted.

    Parameters

    • error: string

      Sets a custom error message that is displayed when a form is submitted.

    Returns void

  • Parameters

    • pointerId: number

    Returns void

  • Parameters

    • replacement: string

    Returns void

  • Parameters

    • replacement: string
    • start: number
    • end: number
    • Optional selectionMode: SelectionMode

    Returns void

  • Sets the start and end positions of a selection in a text field.

    Parameters

    • start: null | number

      The offset into the text field for the start of the selection.

    • end: null | number

      The offset into the text field for the end of the selection.

    • Optional direction: "none" | "forward" | "backward"

      The direction in which the selection is performed.

    Returns void

  • Returns void

  • Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.

    Parameters

    • Optional n: number

      Value to decrement the value by.

    Returns void

  • Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.

    Parameters

    • Optional n: number

      Value to increment the value by.

    Returns void

  • If force is not given, "toggles" qualifiedName, removing it if it is present and adding it if it is not present. If force is true, adds qualifiedName. If force is false, removes qualifiedName.

    Returns true if qualifiedName is now present, and false otherwise.

    Parameters

    • qualifiedName: string
    • Optional force: boolean

    Returns boolean

  • Parameters

    • selectors: string

    Returns boolean

    Deprecated

    This is a legacy alias of matches.

Generated using TypeDoc