ElementInternals
Types
t
type t = WebAPI.DOMTree.elementInternals = { shadowRoot: Null.t<WebAPI.DOMTree.shadowRoot>, form: Null.t<WebAPI.DOMTree.htmlFormElement>, willValidate: bool, validity: WebAPI.DOM.validityState, validationMessage: string, labels: WebAPI.DOM.nodeList<unknown>, states: WebAPI.DOMTree.customStateSet, mutable ariaAtomic: Null.t<string>, mutable ariaAutoComplete: Null.t<string>, mutable ariaBrailleLabel: Null.t<string>, mutable ariaBrailleRoleDescription: Null.t<string>, mutable ariaBusy: Null.t<string>, mutable ariaChecked: Null.t<string>, mutable ariaColCount: Null.t<string>, mutable ariaColIndex: Null.t<string>, mutable ariaColIndexText: Null.t<string>, mutable ariaColSpan: Null.t<string>, mutable ariaCurrent: Null.t<string>, mutable ariaDescription: Null.t<string>, mutable ariaDisabled: Null.t<string>, mutable ariaExpanded: Null.t<string>, mutable ariaHasPopup: Null.t<string>, mutable ariaHidden: Null.t<string>, mutable ariaKeyShortcuts: Null.t<string>, mutable ariaLabel: Null.t<string>, mutable ariaLevel: Null.t<string>, mutable ariaLive: Null.t<string>, mutable ariaModal: Null.t<string>, mutable ariaMultiLine: Null.t<string>, mutable ariaMultiSelectable: Null.t<string>, mutable ariaOrientation: Null.t<string>, mutable ariaPlaceholder: Null.t<string>, mutable ariaPosInSet: Null.t<string>, mutable ariaPressed: Null.t<string>, mutable ariaReadOnly: Null.t<string>, mutable ariaRequired: Null.t<string>, mutable ariaRoleDescription: Null.t<string>, mutable ariaRowCount: Null.t<string>, mutable ariaRowIndex: Null.t<string>, mutable ariaRowIndexText: Null.t<string>, mutable ariaRowSpan: Null.t<string>, mutable ariaSelected: Null.t<string>, mutable ariaSetSize: Null.t<string>, mutable ariaSort: Null.t<string>, mutable ariaValueMax: Null.t<string>, mutable ariaValueMin: Null.t<string>, mutable ariaValueNow: Null.t<string>, mutable ariaValueText: Null.t<string>,}Record fields
shadowRoot
form
willValidate
validity
validationMessage
labels
ariaAtomic
ariaAutoComplete
ariaBrailleLabel
ariaBrailleRoleDescription
ariaBusy
ariaChecked
ariaColCount
ariaColIndex
ariaColIndexText
ariaColSpan
ariaCurrent
ariaDescription
ariaDisabled
ariaExpanded
ariaHasPopup
ariaHidden
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
Values
checkValidity
Returns true if internals's target element has no validity problems; false otherwise. Fires an invalid event at the element in the latter case. Read more on MDN
let checkValidity: WebAPI.DOMTree.elementInternals => boolreportValidity
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. Read more on MDN
let reportValidity: WebAPI.DOMTree.elementInternals => boolsetFormValue
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. Read more on MDN
let setFormValue: ( WebAPI.DOMTree.elementInternals, ~value: unknown, ~state: unknown=?,) => unitsetValidity
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. Read more on MDN
let setValidity: ( WebAPI.DOMTree.elementInternals, ~flags: WebAPI.DOM.validityStateFlags=?, ~message: string=?, ~anchor: WebAPI.DOMTree.htmlElement=?,) => unit