Skip to content

HTMLModElement

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: (
WebAPI.DOMAPI.htmlModElement,
~type_: WebAPI.EventAPI.eventType,
~callback: WebAPI.EventAPI.eventListener<'event>,
~options: WebAPI.EventAPI.addEventListenerOptions=?,
) => unit

addEventListener_useCapture

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_useCapture: (
WebAPI.DOMAPI.htmlModElement,
~type_: WebAPI.EventAPI.eventType,
~callback: WebAPI.EventAPI.eventListener<'event>,
) => unit

after

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: (WebAPI.DOMAPI.htmlModElement, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.htmlModElement WebAPI.DOMAPI.node

Return type

unit

after2

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: (WebAPI.DOMAPI.htmlModElement, string) => unit

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

unit

animate

let animate: (
WebAPI.DOMAPI.htmlModElement,
~keyframes: WebAPI.Prelude.any,
~options: float=?,
) => WebAPI.DOMAPI.animation

animate2

let animate2: (
WebAPI.DOMAPI.htmlModElement,
~keyframes: WebAPI.Prelude.any,
~options: WebAPI.DOMAPI.keyframeAnimationOptions=?,
) => WebAPI.DOMAPI.animation

append

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: (WebAPI.DOMAPI.htmlModElement, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.htmlModElement WebAPI.DOMAPI.node

Return type

unit

append2

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: (WebAPI.DOMAPI.htmlModElement, string) => unit

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

unit

appendChild

let appendChild: (WebAPI.DOMAPI.htmlModElement, 't) => 't

asElement

let asElement: WebAPI.DOMAPI.htmlModElement => WebAPI.DOMAPI.element

asEventTarget

let asEventTarget: WebAPI.DOMAPI.htmlModElement => WebAPI.EventAPI.eventTarget

asHTMLElement

let asHTMLElement: WebAPI.DOMAPI.htmlModElement => WebAPI.DOMAPI.htmlElement

asNode

let asNode: WebAPI.DOMAPI.htmlModElement => WebAPI.DOMAPI.node

attachInternals

let attachInternals: WebAPI.DOMAPI.htmlModElement => WebAPI.DOMAPI.elementInternals

attachShadow

Creates a shadow root for element and returns it. Read more on MDN

let attachShadow: (
WebAPI.DOMAPI.htmlModElement,
WebAPI.DOMAPI.shadowRootInit,
) => WebAPI.DOMAPI.shadowRoot

before

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: (WebAPI.DOMAPI.htmlModElement, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.htmlModElement WebAPI.DOMAPI.node

Return type

unit

before2

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: (WebAPI.DOMAPI.htmlModElement, string) => unit

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

unit

blur

let blur: WebAPI.DOMAPI.htmlModElement => unit

Parameters

WebAPI.DOMAPI.htmlModElement

Return type

unit

checkVisibility

let checkVisibility: (
WebAPI.DOMAPI.htmlModElement,
~options: WebAPI.DOMAPI.checkVisibilityOptions=?,
) => bool

click

let click: WebAPI.DOMAPI.htmlModElement => unit

Parameters

WebAPI.DOMAPI.htmlModElement

Return type

unit

cloneNode

Returns a copy of node. If deep is true, the copy also includes the node's descendants. Read more on MDN

let cloneNode: (
WebAPI.DOMAPI.htmlModElement,
~deep: bool=?,
) => WebAPI.DOMAPI.htmlModElement

Parameters

WebAPI.DOMAPI.htmlModElement option< bool >

Return type

WebAPI.DOMAPI.htmlModElement

closest

Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise. Read more on MDN

let closest: (WebAPI.DOMAPI.htmlModElement, string) => 'e

Parameters

WebAPI.DOMAPI.htmlModElement

Return type

string

compareDocumentPosition

Returns a bitmask indicating the position of other relative to node. Read more on MDN

let compareDocumentPosition: (WebAPI.DOMAPI.htmlModElement, WebAPI.DOMAPI.node) => int

computedStyleMap

let computedStyleMap: WebAPI.DOMAPI.htmlModElement => WebAPI.DOMAPI.stylePropertyMapReadOnly

contains

Returns true if other is an inclusive descendant of node, and false otherwise. Read more on MDN

let contains: (WebAPI.DOMAPI.htmlModElement, WebAPI.DOMAPI.node) => bool

Parameters

WebAPI.DOMAPI.htmlModElement WebAPI.DOMAPI.node

Return type

bool

dispatchEvent

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: (
WebAPI.DOMAPI.htmlModElement,
WebAPI.EventAPI.event,
) => bool

focus

let focus: (
WebAPI.DOMAPI.htmlModElement,
~options: WebAPI.DOMAPI.focusOptions=?,
) => unit

Parameters

WebAPI.DOMAPI.htmlModElement option< WebAPI.DOMAPI.focusOptions >

Return type

unit

getAnimations

let getAnimations: (
WebAPI.DOMAPI.htmlModElement,
~options: WebAPI.DOMAPI.getAnimationsOptions=?,
) => array<WebAPI.DOMAPI.animation>

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: (WebAPI.DOMAPI.htmlModElement, string) => string

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

string

getAttributeNames

Returns the qualified names of all element's attributes. Can contain duplicates. Read more on MDN

let getAttributeNames: WebAPI.DOMAPI.htmlModElement => array<string>

Parameters

WebAPI.DOMAPI.htmlModElement

Return type

array< string >

getAttributeNode

let getAttributeNode: (WebAPI.DOMAPI.htmlModElement, string) => WebAPI.DOMAPI.attr

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

WebAPI.DOMAPI.attr

getAttributeNodeNS

let getAttributeNodeNS: (
WebAPI.DOMAPI.htmlModElement,
~namespace: string,
~localName: string,
) => WebAPI.DOMAPI.attr

Parameters

WebAPI.DOMAPI.htmlModElement string string

Return type

WebAPI.DOMAPI.attr

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: (
WebAPI.DOMAPI.htmlModElement,
~namespace: string,
~localName: string,
) => string

Parameters

WebAPI.DOMAPI.htmlModElement string string

Return type

string

getBoundingClientRect

let getBoundingClientRect: WebAPI.DOMAPI.htmlModElement => WebAPI.DOMAPI.domRect

getClientRects

let getClientRects: WebAPI.DOMAPI.htmlModElement => WebAPI.DOMAPI.domRectList

getElementsByClassName

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: (
WebAPI.DOMAPI.htmlModElement,
string,
) => WebAPI.DOMAPI.htmlCollectionOf<WebAPI.DOMAPI.element>

getElementsByTagName

let getElementsByTagName: (
WebAPI.DOMAPI.htmlModElement,
string,
) => WebAPI.DOMAPI.htmlCollection

getElementsByTagNameNS

let getElementsByTagNameNS: (
WebAPI.DOMAPI.element,
~namespace: string,
~localName: string,
) => WebAPI.DOMAPI.htmlCollectionOf<WebAPI.DOMAPI.element>

getHTML

let getHTML: (
WebAPI.DOMAPI.htmlModElement,
~options: WebAPI.DOMAPI.getHTMLOptions=?,
) => string

Parameters

WebAPI.DOMAPI.htmlModElement option< WebAPI.DOMAPI.getHTMLOptions >

Return type

string

getRootNode

Returns node's root. Read more on MDN

let getRootNode: (
WebAPI.DOMAPI.htmlModElement,
~options: WebAPI.DOMAPI.getRootNodeOptions=?,
) => WebAPI.DOMAPI.node

hasAttribute

Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise. Read more on MDN

let hasAttribute: (WebAPI.DOMAPI.htmlModElement, string) => bool

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

bool

hasAttributeNS

Returns true if element has an attribute whose namespace is namespace and local name is localName. Read more on MDN

let hasAttributeNS: (
WebAPI.DOMAPI.htmlModElement,
~namespace: string,
~localName: string,
) => bool

Parameters

WebAPI.DOMAPI.htmlModElement string string

Return type

bool

hasAttributes

Returns true if element has attributes, and false otherwise. Read more on MDN

let hasAttributes: WebAPI.DOMAPI.htmlModElement => bool

Parameters

WebAPI.DOMAPI.htmlModElement

Return type

bool

hasChildNodes

Returns whether node has children. Read more on MDN

let hasChildNodes: WebAPI.DOMAPI.htmlModElement => bool

Parameters

WebAPI.DOMAPI.htmlModElement

Return type

bool

hasPointerCapture

let hasPointerCapture: (WebAPI.DOMAPI.htmlModElement, int) => bool

Parameters

WebAPI.DOMAPI.htmlModElement int

Return type

bool

hidePopover

let hidePopover: WebAPI.DOMAPI.htmlModElement => unit

Parameters

WebAPI.DOMAPI.htmlModElement

Return type

unit

insertAdjacentElement

let insertAdjacentElement: (
WebAPI.DOMAPI.htmlModElement,
~where: WebAPI.DOMAPI.insertPosition,
~element: WebAPI.DOMAPI.element,
) => WebAPI.DOMAPI.element

insertAdjacentHTML

let insertAdjacentHTML: (
WebAPI.DOMAPI.htmlModElement,
~position: WebAPI.DOMAPI.insertPosition,
~string: string,
) => unit

Parameters

WebAPI.DOMAPI.htmlModElement WebAPI.DOMAPI.insertPosition string

Return type

unit

insertAdjacentText

let insertAdjacentText: (
WebAPI.DOMAPI.htmlModElement,
~where: WebAPI.DOMAPI.insertPosition,
~data: string,
) => unit

Parameters

WebAPI.DOMAPI.htmlModElement WebAPI.DOMAPI.insertPosition string

Return type

unit

insertBefore

let insertBefore: (
WebAPI.DOMAPI.htmlModElement,
't,
~child: WebAPI.DOMAPI.node,
) => 't

isDefaultNamespace

let isDefaultNamespace: (WebAPI.DOMAPI.htmlModElement, string) => bool

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

bool

isEqualNode

Returns whether node and otherNode have the same properties. Read more on MDN

let isEqualNode: (WebAPI.DOMAPI.htmlModElement, WebAPI.DOMAPI.node) => bool

Parameters

WebAPI.DOMAPI.htmlModElement WebAPI.DOMAPI.node

Return type

bool

isSameNode

let isSameNode: (WebAPI.DOMAPI.htmlModElement, WebAPI.DOMAPI.node) => bool

Parameters

WebAPI.DOMAPI.htmlModElement WebAPI.DOMAPI.node

Return type

bool

lookupNamespaceURI

let lookupNamespaceURI: (WebAPI.DOMAPI.htmlModElement, string) => string

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

string

lookupPrefix

let lookupPrefix: (WebAPI.DOMAPI.htmlModElement, string) => string

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

string

matches

Returns true if matching selectors against element's root yields element, and false otherwise. Read more on MDN

let matches: (WebAPI.DOMAPI.htmlModElement, string) => bool

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

bool

normalize

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: WebAPI.DOMAPI.htmlModElement => unit

Parameters

WebAPI.DOMAPI.htmlModElement

Return type

unit

prepend

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: (WebAPI.DOMAPI.htmlModElement, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.htmlModElement WebAPI.DOMAPI.node

Return type

unit

prepend2

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: (WebAPI.DOMAPI.htmlModElement, string) => unit

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

unit

querySelector

Returns the first element that is a descendant of node that matches selectors. Read more on MDN

let querySelector: (
WebAPI.DOMAPI.htmlModElement,
string,
) => Null.t<WebAPI.DOMAPI.element>

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

Null.t< WebAPI.DOMAPI.element >

querySelectorAll

Returns all element descendants of node that match selectors. Read more on MDN

let querySelectorAll: (
WebAPI.DOMAPI.htmlModElement,
string,
) => WebAPI.DOMAPI.nodeList

releasePointerCapture

let releasePointerCapture: (WebAPI.DOMAPI.htmlModElement, int) => unit

Parameters

WebAPI.DOMAPI.htmlModElement int

Return type

unit

remove

Removes node. Read more on MDN

let remove: WebAPI.DOMAPI.htmlModElement => unit

Parameters

WebAPI.DOMAPI.htmlModElement

Return type

unit

removeAttribute

Removes element's first attribute whose qualified name is qualifiedName. Read more on MDN

let removeAttribute: (WebAPI.DOMAPI.htmlModElement, string) => unit

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

unit

removeAttributeNode

let removeAttributeNode: (
WebAPI.DOMAPI.htmlModElement,
WebAPI.DOMAPI.attr,
) => WebAPI.DOMAPI.attr

removeAttributeNS

Removes element's attribute whose namespace is namespace and local name is localName. Read more on MDN

let removeAttributeNS: (
WebAPI.DOMAPI.htmlModElement,
~namespace: string,
~localName: string,
) => unit

Parameters

WebAPI.DOMAPI.htmlModElement string string

Return type

unit

removeChild

let removeChild: (WebAPI.DOMAPI.htmlModElement, 't) => 't

removeEventListener

Removes the event listener in target's event listener list with the same type, callback, and options. Read more on MDN

let removeEventListener: (
WebAPI.DOMAPI.htmlModElement,
~type_: WebAPI.EventAPI.eventType,
~callback: WebAPI.EventAPI.eventListener<'event>,
~options: WebAPI.EventAPI.eventListenerOptions=?,
) => unit

removeEventListener_useCapture

Removes the event listener in target's event listener list with the same type, callback, and options. Read more on MDN

let removeEventListener_useCapture: (
WebAPI.DOMAPI.htmlModElement,
~type_: WebAPI.EventAPI.eventType,
~callback: WebAPI.EventAPI.eventListener<'event>,
) => unit

replaceChild

let replaceChild: (
WebAPI.DOMAPI.htmlModElement,
~node: WebAPI.DOMAPI.node,
't,
) => 't

replaceChildren

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: (WebAPI.DOMAPI.htmlModElement, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.htmlModElement WebAPI.DOMAPI.node

Return type

unit

replaceChildren2

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: (WebAPI.DOMAPI.htmlModElement, string) => unit

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

unit

replaceWith

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: (WebAPI.DOMAPI.htmlModElement, WebAPI.DOMAPI.node) => unit

Parameters

WebAPI.DOMAPI.htmlModElement WebAPI.DOMAPI.node

Return type

unit

replaceWith2

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: (WebAPI.DOMAPI.htmlModElement, string) => unit

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

unit

requestFullscreen

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: (
WebAPI.DOMAPI.htmlModElement,
~options: WebAPI.DOMAPI.fullscreenOptions=?,
) => Promise.t<unit>

Parameters

WebAPI.DOMAPI.htmlModElement option< WebAPI.DOMAPI.fullscreenOptions >

Return type

Promise.t< unit >

requestPointerLock

let requestPointerLock: (
WebAPI.DOMAPI.htmlModElement,
~options: WebAPI.DOMAPI.pointerLockOptions=?,
) => Promise.t<unit>

Parameters

WebAPI.DOMAPI.htmlModElement option< WebAPI.DOMAPI.pointerLockOptions >

Return type

Promise.t< unit >

scroll

let scroll: (
WebAPI.DOMAPI.htmlModElement,
~options: WebAPI.DOMAPI.scrollToOptions=?,
) => unit

Parameters

WebAPI.DOMAPI.htmlModElement option< WebAPI.DOMAPI.scrollToOptions >

Return type

unit

scroll2

let scroll2: (WebAPI.DOMAPI.htmlModElement, ~x: float, ~y: float) => unit

Parameters

WebAPI.DOMAPI.htmlModElement float float

Return type

unit

scrollBy

let scrollBy: (
WebAPI.DOMAPI.htmlModElement,
~options: WebAPI.DOMAPI.scrollToOptions=?,
) => unit

Parameters

WebAPI.DOMAPI.htmlModElement option< WebAPI.DOMAPI.scrollToOptions >

Return type

unit

scrollBy2

let scrollBy2: (WebAPI.DOMAPI.htmlModElement, ~x: float, ~y: float) => unit

Parameters

WebAPI.DOMAPI.htmlModElement float float

Return type

unit

scrollIntoView

scrollIntoView()

Scrolls the element's ancestor containers such that the element on which scrollIntoView() is called is visible to the user.

element->Element.scrollIntoView()

Read more on MDN

let scrollIntoView: WebAPI.DOMAPI.htmlModElement => unit

Parameters

WebAPI.DOMAPI.htmlModElement

Return type

unit

scrollIntoView_alignToTop

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()

Read more on MDN

let scrollIntoView_alignToTop: WebAPI.DOMAPI.htmlModElement => unit

Parameters

WebAPI.DOMAPI.htmlModElement

Return type

unit

scrollIntoView_withOptions

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.scrollIntoView_withOptions({ behavior: DOMAPI.Smooth })

Read more on MDN

let scrollIntoView_withOptions: (
WebAPI.DOMAPI.htmlModElement,
WebAPI.DOMAPI.scrollIntoViewOptions,
) => unit

scrollTo

let scrollTo: (
WebAPI.DOMAPI.htmlModElement,
~options: WebAPI.DOMAPI.scrollToOptions=?,
) => unit

Parameters

WebAPI.DOMAPI.htmlModElement option< WebAPI.DOMAPI.scrollToOptions >

Return type

unit

scrollTo2

let scrollTo2: (WebAPI.DOMAPI.htmlModElement, ~x: float, ~y: float) => unit

Parameters

WebAPI.DOMAPI.htmlModElement float float

Return type

unit

setAttribute

Sets the value of element's first attribute whose qualified name is qualifiedName to value. Read more on MDN

let setAttribute: (
WebAPI.DOMAPI.htmlModElement,
~qualifiedName: string,
~value: string,
) => unit

Parameters

WebAPI.DOMAPI.htmlModElement string string

Return type

unit

setAttributeNode

let setAttributeNode: (
WebAPI.DOMAPI.htmlModElement,
WebAPI.DOMAPI.attr,
) => WebAPI.DOMAPI.attr

setAttributeNodeNS

let setAttributeNodeNS: (
WebAPI.DOMAPI.htmlModElement,
WebAPI.DOMAPI.attr,
) => WebAPI.DOMAPI.attr

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: (
WebAPI.DOMAPI.element,
~namespace: string,
~qualifiedName: string,
~value: string,
) => unit

Parameters

WebAPI.DOMAPI.element string string string

Return type

unit

setHTMLUnsafe

let setHTMLUnsafe: (WebAPI.DOMAPI.htmlModElement, string) => unit

Parameters

WebAPI.DOMAPI.htmlModElement string

Return type

unit

setPointerCapture

let setPointerCapture: (WebAPI.DOMAPI.htmlModElement, int) => unit

Parameters

WebAPI.DOMAPI.htmlModElement int

Return type

unit

showPopover

let showPopover: WebAPI.DOMAPI.htmlModElement => unit

Parameters

WebAPI.DOMAPI.htmlModElement

Return type

unit

toggleAttribute

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: (
WebAPI.DOMAPI.htmlModElement,
~qualifiedName: string,
~force: bool=?,
) => bool

Parameters

WebAPI.DOMAPI.htmlModElement string option< bool >

Return type

bool

togglePopover

let togglePopover: (WebAPI.DOMAPI.htmlModElement, ~force: bool=?) => bool

Parameters

WebAPI.DOMAPI.htmlModElement option< bool >

Return type

bool