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

ElementInternals

interface ElementInternals extends ARIAMixin {
readonly form: HTMLFormElement | null;
readonly labels: NodeList;
readonly shadowRoot: ShadowRoot | null;
readonly validationMessage: string;
readonly validity: ValidityState;
readonly willValidate: boolean;
checkValidity(): boolean;
reportValidity(): boolean;
setFormValue(value:
| File
| string
| null
, state?:
| File
| string
| null
): void;
setValidity(
message?: string,
anchor?: HTMLElement,
): void;
}
var ElementInternals: {
prototype: ElementInternals;
}
;

§Extends

§Properties

§
readonly form: HTMLFormElement | null
[src]

Returns the form owner of internals's target element.

§
readonly labels: NodeList
[src]

Returns a NodeList of all the label elements that internals's target element is associated with.

§
readonly shadowRoot: ShadowRoot | null
[src]

Returns the ShadowRoot for internals's target element, if the target element is a shadow host, or null otherwise.

§
readonly validationMessage: string
[src]

Returns the error message that would be shown to the user if internals's target element was to be checked for validity.

§
readonly validity: ValidityState
[src]

Returns the ValidityState object for internals's target element.

§
readonly willValidate: boolean
[src]

Returns true if internals's target element will be validated when the form is submitted; false otherwise.

§Methods

§
checkValidity(): boolean
[src]

Returns true if internals's target element has no validity problems; false otherwise. Fires an invalid event at the element in the latter case.

§
reportValidity(): boolean
[src]

Returns true if internals's target element has no validity problems; otherwise, returns false, fires an invalid event at the element, and (if the event isn't canceled) reports the problem to the user.

§
setFormValue(value:
| File
| string
| null
, state?:
| File
| string
| null
): void
[src]

Sets both the state and submission value of internals's target element to value.

If value is null, the element won't participate in form submission.

§
setValidity(
message?: string,
anchor?: HTMLElement,
): void
[src]

Marks internals's target element as suffering from the constraints indicated by the flags argument, and sets the element's validation message to message. If anchor is specified, the user agent might use it to indicate problems with the constraints of internals's target element when the form owner is validated interactively or reportValidity() is called.