HTMLInputElement
Types
getRootNodeOptions
type getRootNodeOptions = {mutable composed?: bool}Record fields
composed
t
Provides special properties and methods for manipulating the options, layout, and presentation of <input> elements. See HTMLInputElement on MDN TODO: mark as private once mutating fields of private records is allowed
type t = { namespaceURI: Null.t<string>, prefix: Null.t<string>, localName: string, tagName: string, mutable id: string, mutable className: string, classList: WebAPI.DOM.domTokenList, mutable slot: string, attributes: WebAPI.DOM.namedNodeMap, shadowRoot: Null.t<WebAPI.DOMTree.shadowRoot>, part: WebAPI.DOM.domTokenList, mutable scrollTop: float, mutable scrollLeft: float, scrollWidth: int, scrollHeight: int, clientTop: int, clientLeft: int, clientWidth: int, clientHeight: int, currentCSSZoom: float, mutable innerHTML: string, mutable outerHTML: string, nodeType: int, nodeName: string, baseURI: string, isConnected: bool, ownerDocument: Null.t<WebAPI.DOM.document>, parentNode: Null.t<WebAPI.DOMTree.node>, parentElement: Null.t<WebAPI.DOMTree.htmlElement>, childNodes: WebAPI.DOM.nodeList<WebAPI.DOMTree.node>, firstChild: Null.t<WebAPI.DOMTree.node>, lastChild: Null.t<WebAPI.DOMTree.node>, previousSibling: Null.t<WebAPI.DOMTree.node>, nextSibling: Null.t<WebAPI.DOMTree.node>, mutable nodeValue: Null.t<string>, mutable textContent: Null.t<string>, mutable title: string, mutable lang: string, mutable translate: bool, mutable dir: string, mutable inert: bool, mutable accessKey: string, accessKeyLabel: string, mutable draggable: bool, mutable spellcheck: bool, mutable autocapitalize: string, mutable innerText: string, mutable outerText: string, mutable popover: Null.t<string>, offsetParent: Null.t<WebAPI.DOMTree.element>, offsetTop: int, offsetLeft: int, offsetWidth: int, offsetHeight: int, style: WebAPI.CSSStyleDeclaration.t, attributeStyleMap: WebAPI.StylePropertyMap.t, mutable contentEditable: string, mutable enterKeyHint: string, isContentEditable: bool, mutable inputMode: string, dataset: WebAPI.DOMStringMap.t, mutable nonce?: string, mutable autofocus: bool, mutable tabIndex: int, mutable accept: string, mutable alt: string, mutable autocomplete: string, mutable defaultChecked: bool, mutable checked: bool, mutable disabled: bool, form: Null.t<WebAPI.DOMTree.htmlFormElement>, mutable files: Null.t<WebAPI.DOM.fileList>, mutable formAction: string, mutable formEnctype: string, mutable formMethod: string, mutable height: int, mutable indeterminate: bool, list: Null.t<WebAPI.HTMLDataListElement.t>, mutable max: string, mutable maxLength: int, mutable min: string, mutable minLength: int, mutable multiple: bool, mutable name: string, mutable pattern: string, mutable placeholder: string, mutable readOnly: bool, mutable required: bool, mutable size: int, mutable src: string, mutable step: string, mutable type_: string, mutable defaultValue: string, mutable value: string, mutable valueAsDate: Null.t<Date.t>, mutable valueAsNumber: float, mutable width: int, willValidate: bool, validity: WebAPI.DOM.validityState, validationMessage: string, labels: Null.t< WebAPI.DOM.nodeList<WebAPI.HTMLLabelElement.t>, >, mutable selectionStart: Null.t<int>, mutable selectionEnd: Null.t<int>, mutable selectionDirection: Null.t<string>, mutable webkitdirectory: bool, webkitEntries: array< WebAPI.BaseFileAndDirectoryEntries.fileSystemEntry, >, mutable capture: string, mutable popoverTargetElement: Null.t< WebAPI.DOMTree.element, >, mutable popoverTargetAction: string,}Record fields
id
Returns the value of element's id content attribute. Can be set to change it. Read more on MDN
className
Returns the value of element's class content attribute. Can be set to change it. Read more on MDN
classList
Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. Read more on MDN
slot
Returns the value of element's slot content attribute. Can be set to change it. Read more on MDN
shadowRoot
Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. Read more on MDN
ownerDocument
Returns the node document. Returns null for documents. Read more on MDN
autocomplete
Specifies whether autocomplete is applied to an editable text field. Read more on MDN
form
Retrieves a reference to the form that the object is embedded in. Read more on MDN
files
Returns a FileList object on a file type input object. Read more on MDN
formAction
Overrides the action attribute (where the data on a form is sent) on the parent form element. Read more on MDN
formEnctype
Used to override the encoding (formEnctype attribute) specified on the form element. Read more on MDN
formMethod
Overrides the submit method attribute previously specified on a form element. Read more on MDN
indeterminate
When set, overrides the rendering of checkbox controls so that the current value is not visible. Read more on MDN
list
Specifies the ID of a pre-defined datalist of options for an input element. Read more on MDN
max
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. Read more on MDN
maxLength
Sets or retrieves the maximum number of characters that the user can enter in a text control. Read more on MDN
min
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. Read more on MDN
multiple
Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. Read more on MDN
pattern
Gets or sets a string containing a regular expression that the user's input must match. Read more on MDN
placeholder
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. Read more on MDN
required
When present, marks an element that can't be submitted without a value. Read more on MDN
src
The address or WebApiURL of the a media resource that is to be considered. Read more on MDN
step
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. Read more on MDN
valueAsDate
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. Read more on MDN
willValidate
Returns whether an element will successfully validate based on forms validation rules and constraints. Read more on MDN
validity
Returns a ValidityState object that represents the validity states of an element. Read more on MDN
validationMessage
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. Read more on MDN
selectionStart
Gets or sets the starting position or offset of a text selection. Read more on MDN
selectionEnd
Gets or sets the end position or offset of a text selection. Read more on MDN
Values
addEventListener
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. Read more on MDN
let addEventListener: ( t, WebAPI.EventType.t, WebAPI.DOM.EventListener.t<'event>, ~options: WebAPI.DOM.EventListener.addEventListenerOptions=?,) => unitParameters
tWebAPI.EventType.tWebAPI.DOM.EventListener.toption<WebAPI.DOM.EventListener.addEventListenerOptions>Return type
unitaddEventListenerWithCapture
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. Read more on MDN
let addEventListenerWithCapture: ( t, WebAPI.EventType.t, WebAPI.DOM.EventListener.t<'event>,) => unitafter
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. Read more on MDN
let after: (t, WebAPI.DOMTree.node) => unitafter2
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. Read more on MDN
let after2: (t, string) => unitanimate
let animate: ( t, ~keyframes: unknown, ~options: float=?,) => WebAPI.Animation.tanimate2
let animate2: ( t, ~keyframes: unknown, ~options: WebAPI.Animation.keyframeAnimationOptions=?,) => WebAPI.Animation.tappend
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. Read more on MDN
let append: (t, WebAPI.DOMTree.node) => unitappend2
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. Read more on MDN
let append2: (t, string) => unitasEventTarget
let asEventTarget: t => WebAPI.DOM.eventTargetasHTMLElement
let asHTMLElement: t => WebAPI.DOMTree.htmlElementattachInternals
let attachInternals: t => WebAPI.DOMTree.elementInternalsattachShadow
Creates a shadow root for element and returns it. Read more on MDN
let attachShadow: (t, WebAPI.HTML.shadowRootInit) => WebAPI.DOMTree.shadowRootbefore
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. Read more on MDN
let before: (t, WebAPI.DOMTree.node) => unitbefore2
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. Read more on MDN
let before2: (t, string) => unitcheckValidity
Returns whether a form will validate when it is submitted, without having to submit it. Read more on MDN
let checkValidity: t => boolcheckVisibility
let checkVisibility: (t, ~options: WebAPI.DOM.checkVisibilityOptions=?) => boolcloneNode
Returns a copy of node. If deep is true, the copy also includes the node's descendants. Read more on MDN
let cloneNode: (t, ~deep: bool=?) => tclosest
Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise. Read more on MDN
let closest: (t, string) => Null.t<'e>compareDocumentPosition
Returns a bitmask indicating the position of other relative to node. Read more on MDN
let compareDocumentPosition: (t, WebAPI.DOMTree.node) => intcomputedStyleMap
let computedStyleMap: t => WebAPI.StylePropertyMapReadOnly.tcontains
Returns true if other is an inclusive descendant of node, and false otherwise. Read more on MDN
let contains: (t, WebAPI.DOMTree.node) => booldispatchEvent
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. Read more on MDN
let dispatchEvent: (t, WebAPI.DOM.event) => boolfocus
let focus: (t, ~options: WebAPI.DOM.focusOptions=?) => unitgetAnimations
let getAnimations: ( t, ~options: WebAPI.AnimationEffect.getAnimationsOptions=?,) => array<WebAPI.Animation.t>getAttribute
Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise. Read more on MDN
let getAttribute: (t, string) => Null.t<string>getAttributeNames
Returns the qualified names of all element's attributes. Can contain duplicates. Read more on MDN
let getAttributeNames: t => array<string>getAttributeNode
let getAttributeNode: (t, string) => Null.t<WebAPI.Attr.t>getAttributeNodeNS
let getAttributeNodeNS: ( t, ~namespace: string, ~localName: string,) => Null.t<WebAPI.Attr.t>getAttributeNS
Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise. Read more on MDN
let getAttributeNS: ( t, ~namespace: string, ~localName: string,) => Null.t<string>getBoundingClientRect
let getBoundingClientRect: t => WebAPI.DOM.domRectgetClientRects
let getClientRects: t => WebAPI.DOM.domRectListgetElementsByClassName
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. Read more on MDN
let getElementsByClassName: ( t, string,) => WebAPI.HTMLCollection.t<WebAPI.DOMTree.element>getElementsByTagName
let getElementsByTagName: ( t, string,) => WebAPI.HTMLCollection.t<WebAPI.DOMTree.element>getElementsByTagNameNS
let getElementsByTagNameNS: ( WebAPI.DOMTree.element, ~namespace: string, ~localName: string,) => WebAPI.HTMLCollection.t<WebAPI.DOMTree.element>Parameters
WebAPI.DOMTree.elementstringstringReturn type
WebAPI.HTMLCollection.t<WebAPI.DOMTree.element>getHTML
let getHTML: (t, ~options: WebAPI.HTML.getHTMLOptions=?) => stringgetRootNode
Returns node's root. Read more on MDN
let getRootNode: (t, ~options: getRootNodeOptions=?) => WebAPI.DOMTree.nodehasAttribute
Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise. Read more on MDN
let hasAttribute: (t, string) => boolhasAttributeNS
Returns true if element has an attribute whose namespace is namespace and local name is localName. Read more on MDN
let hasAttributeNS: (t, ~namespace: string, ~localName: string) => boolhasAttributes
Returns true if element has attributes, and false otherwise. Read more on MDN
let hasAttributes: t => boolhasPointerCapture
let hasPointerCapture: (t, int) => boolhidden
Returns the element's current hidden state.
let description = switch element->HTMLElement.hidden {
| HTMLElement.Visible => "visible"
| HTMLElement.Hidden => "hidden"
| HTMLElement.HiddenUntilFound => "hidden until found"
}
This getter never returns null.
let hidden: t => \"HTMLElement-WebAPI".hiddenStateinsertAdjacentElement
let insertAdjacentElement: ( t, ~where: WebAPI.DOM.insertPosition, ~element: WebAPI.DOMTree.element,) => Null.t<WebAPI.DOMTree.element>Parameters
tWebAPI.DOM.insertPositionWebAPI.DOMTree.elementReturn type
Stdlib.Null.t<WebAPI.DOMTree.element>insertAdjacentHTML
let insertAdjacentHTML: ( t, ~position: WebAPI.DOM.insertPosition, ~string: string,) => unitinsertAdjacentText
let insertAdjacentText: ( t, ~where: WebAPI.DOM.insertPosition, ~data: string,) => unitinsertBefore
let insertBefore: (t, 't, ~child: WebAPI.DOMTree.node) => 'tisDefaultNamespace
let isDefaultNamespace: (t, string) => boolisEqualNode
Returns whether node and otherNode have the same properties. Read more on MDN
let isEqualNode: (t, WebAPI.DOMTree.node) => boolisSameNode
let isSameNode: (t, WebAPI.DOMTree.node) => boollookupNamespaceURI
let lookupNamespaceURI: (t, string) => Null.t<string>lookupPrefix
let lookupPrefix: (t, string) => Null.t<string>matches
Returns true if matching selectors against element's root yields element, and false otherwise. Read more on MDN
let matches: (t, string) => boolnormalize
Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes. Read more on MDN
let normalize: t => unitprepend
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. Read more on MDN
let prepend: (t, WebAPI.DOMTree.node) => unitprepend2
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. Read more on MDN
let prepend2: (t, string) => unitquerySelector
Returns the first element that is a descendant of node that matches selectors. Read more on MDN
let querySelector: (t, string) => Null.t<WebAPI.DOMTree.element>querySelectorAll
Returns all element descendants of node that match selectors. Read more on MDN
let querySelectorAll: (t, string) => WebAPI.DOM.nodeList<WebAPI.DOMTree.element>releasePointerCapture
let releasePointerCapture: (t, int) => unitremoveAttribute
Removes element's first attribute whose qualified name is qualifiedName. Read more on MDN
let removeAttribute: (t, string) => unitremoveAttributeNode
let removeAttributeNode: (t, WebAPI.Attr.t) => WebAPI.Attr.tremoveAttributeNS
Removes element's attribute whose namespace is namespace and local name is localName. Read more on MDN
let removeAttributeNS: (t, ~namespace: string, ~localName: string) => unitremoveEventListener
Removes the event listener in target's event listener list with the same type, callback, and options. Read more on MDN
let removeEventListener: ( t, WebAPI.EventType.t, WebAPI.DOM.EventListener.t<'event>, ~options: WebAPI.DOM.EventListener.options=?,) => unitParameters
tWebAPI.EventType.tWebAPI.DOM.EventListener.toption<WebAPI.DOM.EventListener.options>Return type
unitremoveEventListenerUseCapture
Removes the event listener in target's event listener list with the same type, callback, and options. Read more on MDN
let removeEventListenerUseCapture: ( t, WebAPI.EventType.t, WebAPI.DOM.EventListener.t<'event>,) => unitreplaceChild
let replaceChild: (t, ~node: WebAPI.DOMTree.node, 't) => 'treplaceChildren
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. Read more on MDN
let replaceChildren: (t, WebAPI.DOMTree.node) => unitreplaceChildren2
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. Read more on MDN
let replaceChildren2: (t, string) => unitreplaceWith
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. Read more on MDN
let replaceWith: (t, WebAPI.DOMTree.node) => unitreplaceWith2
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. Read more on MDN
let replaceWith2: (t, string) => unitrequestFullscreen
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. Read more on MDN
let requestFullscreen: ( t, ~options: WebAPI.DOM.fullscreenOptions=?,) => promise<unit>requestPointerLock
let requestPointerLock: ( t, ~options: WebAPI.DOM.pointerLockOptions=?,) => promise<unit>scroll
let scroll: (t, ~options: WebAPI.DOM.scrollToOptions=?) => unitscroll2
let scroll2: (t, ~x: float, ~y: float) => unitscrollBy
let scrollBy: (t, ~options: WebAPI.DOM.scrollToOptions=?) => unitscrollBy2
let scrollBy2: (t, ~x: float, ~y: float) => unitscrollIntoView
scrollIntoView()
Scrolls the element's ancestor containers such that the element on which scrollIntoView() is called is visible to the user.
element->Element.scrollIntoView()
let scrollIntoView: t => unitscrollIntoViewAlignToTop
scrollIntoView(true)
Scrolls the element's ancestor containers such that the element on which scrollIntoView() is called is visible to the user.
element->Element.scrollIntoView_alignToTop()
let scrollIntoViewAlignToTop: t => unitscrollIntoViewWithOptions
scrollIntoView({ behavior: "smooth" })
Scrolls the element's ancestor containers such that the element on which scrollIntoView() is called is visible to the user.
element->Element.scrollIntoViewWithOptions({ behavior: DOMAPI.Smooth })
let scrollIntoViewWithOptions: (t, WebAPI.DOM.scrollIntoViewOptions) => unitscrollTo
let scrollTo: (t, ~options: WebAPI.DOM.scrollToOptions=?) => unitscrollTo2
let scrollTo2: (t, ~x: float, ~y: float) => unitsetAttribute
Sets the value of element's first attribute whose qualified name is qualifiedName to value. Read more on MDN
let setAttribute: (t, ~qualifiedName: string, ~value: string) => unitsetAttributeNode
let setAttributeNode: (t, WebAPI.Attr.t) => Null.t<WebAPI.Attr.t>setAttributeNodeNS
let setAttributeNodeNS: (t, WebAPI.Attr.t) => Null.t<WebAPI.Attr.t>setAttributeNS
Sets the value of element's attribute whose namespace is namespace and local name is localName to value. Read more on MDN
let setAttributeNS: ( t, ~namespace: string, ~qualifiedName: string, ~value: string,) => unitsetCustomValidity
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. Read more on MDN
let setCustomValidity: (t, string) => unitsetHidden
Sets the element's semantic hidden state.
element->HTMLElement.setHidden(HTMLElement.Hidden)
element->HTMLElement.setHidden(HTMLElement.HiddenUntilFound)
element->HTMLElement.setHidden(HTMLElement.Visible)
The browser also accepts values such as numbers, arbitrary strings, null, and
undefined, but coerces each of them to one of these three states. This binding
intentionally accepts only hiddenState so callers express the resulting state
rather than relying on coercion.
let setHidden: (t, \"HTMLElement-WebAPI".hiddenState) => unitsetPointerCapture
let setPointerCapture: (t, int) => unitsetRangeText2
let setRangeText2: ( t, ~replacement: string, ~start: int, ~end: int, ~selectionMode: WebAPI.DOM.selectionMode=?,) => unitsetSelectionRange
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. Read more on MDN
let setSelectionRange: (t, ~start: int, ~end: int, ~direction: string=?) => unitstepDown
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. @param n Value to decrement the value by. Read more on MDN
let stepDown: (t, ~n: int=?) => unitstepUp
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. @param n Value to increment the value by. Read more on MDN
let stepUp: (t, ~n: int=?) => unittoggleAttribute
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. Read more on MDN
let toggleAttribute: (t, ~qualifiedName: string, ~force: bool=?) => booltogglePopover
let togglePopover: (t, ~force: bool=?) => bool