Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

HTMLTextAreaElement

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

interface HTMLTextAreaElement extends HTMLElement {
autocomplete: string;
cols: number;
defaultValue: string;
dirName: string;
disabled: boolean;
readonly form: HTMLFormElement | null;
readonly labels: NodeListOf<HTMLLabelElement>;
maxLength: number;
minLength: number;
name: string;
placeholder: string;
readOnly: boolean;
required: boolean;
rows: number;
selectionDirection: "forward" | "backward" | "none";
selectionEnd: number;
selectionStart: number;
readonly textLength: number;
readonly type: string;
readonly validationMessage: string;
readonly validity: ValidityState;
value: string;
readonly willValidate: boolean;
wrap: string;
addEventListener<K extends keyof HTMLElementEventMap>(
type: K,
listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void;
checkValidity(): boolean;
removeEventListener<K extends keyof HTMLElementEventMap>(
type: K,
listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void;
reportValidity(): boolean;
select(): void;
setCustomValidity(error: string): void;
setRangeText(replacement: string): void;
setRangeText(
replacement: string,
start: number,
end: number,
selectionMode?: SelectionMode,
): void;
setSelectionRange(
start: number | null,
end: number | null,
direction?: "forward" | "backward" | "none",
): void;
}
var HTMLTextAreaElement: {
prototype: HTMLTextAreaElement;
}
;

§Extends

§Properties

§
autocomplete: string
[src]
§
cols: number
[src]

Sets or retrieves the width of the object.

§
defaultValue: string
[src]

Sets or retrieves the initial contents of the object.

§
dirName: string
[src]
§
disabled: boolean
[src]
§
readonly form: HTMLFormElement | null
[src]

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

§
maxLength: number
[src]

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

§
minLength: number
[src]
§
name: string
[src]

Sets or retrieves the name of the object.

§
placeholder: string
[src]

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.

§
readOnly: boolean
[src]

Sets or retrieves the value indicated whether the content of the object is read-only.

§
required: boolean
[src]

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

§
rows: number
[src]

Sets or retrieves the number of horizontal rows contained in the object.

§
selectionDirection: "forward" | "backward" | "none"
[src]
§
selectionEnd: number
[src]

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

§
selectionStart: number
[src]

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

§
readonly textLength: number
[src]
§
readonly type: string
[src]

Retrieves the type of control.

§
readonly validationMessage: string
[src]

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.

§
readonly validity: ValidityState
[src]

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

§
value: string
[src]

Retrieves or sets the text in the entry field of the textArea element.

§
readonly willValidate: boolean
[src]

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

§
wrap: string
[src]

Sets or retrieves how to handle wordwrapping in the object.

§Methods

§
addEventListener<K extends keyof HTMLElementEventMap>(
type: K,
listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
[src]
§
checkValidity(): boolean
[src]

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

§
removeEventListener<K extends keyof HTMLElementEventMap>(
type: K,
listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
[src]
§
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void
[src]
§
reportValidity(): boolean
[src]
§
select(): void
[src]

Highlights the input area of a form element.

§
setCustomValidity(error: string): void
[src]

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

@param error

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

§
setRangeText(replacement: string): void
[src]
§
setRangeText(
replacement: string,
start: number,
end: number,
selectionMode?: SelectionMode,
): void
[src]
§
setSelectionRange(
start: number | null,
end: number | null,
direction?: "forward" | "backward" | "none",
): void
[src]

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

@param start

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

@param end

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

@param direction

The direction in which the selection is performed.