HTMLSelectElement
Values
add
Adds an element to the areas, controlRange, or options collection. @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection. @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection. Read more on MDN
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
Parameters
WebAPI.DOMAPI.htmlSelectElement WebAPI.EventAPI.eventType WebAPI.EventAPI.eventListener option< WebAPI.EventAPI.addEventListenerOptions >Return type
unitaddEventListener_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
Parameters
WebAPI.DOMAPI.htmlSelectElement WebAPI.EventAPI.eventType WebAPI.EventAPI.eventListenerReturn type
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
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
animate
Parameters
WebAPI.DOMAPI.htmlSelectElement WebAPI.Prelude.any option< float >Return type
WebAPI.DOMAPI.animationanimate2
Parameters
WebAPI.DOMAPI.htmlSelectElement WebAPI.Prelude.any option< WebAPI.DOMAPI.keyframeAnimationOptions >Return type
WebAPI.DOMAPI.animationappend
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
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
appendChild
asElement
asEventTarget
asHTMLElement
asNode
attachInternals
attachShadow
Creates a shadow root for element and returns it. Read more on MDN
Parameters
WebAPI.DOMAPI.htmlSelectElement WebAPI.DOMAPI.shadowRootInitReturn type
WebAPI.DOMAPI.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
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
checkValidity
Returns whether a form will validate when it is submitted, without having to submit it. Read more on MDN
checkVisibility
Parameters
WebAPI.DOMAPI.htmlSelectElement option< WebAPI.DOMAPI.checkVisibilityOptions >Return type
boolcloneNode
Returns a copy of node. If deep is true, the copy also includes the node's descendants. Read more on MDN
Parameters
WebAPI.DOMAPI.htmlSelectElement option< bool >Return type
WebAPI.DOMAPI.htmlSelectElementclosest
Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise. Read more on MDN
compareDocumentPosition
Returns a bitmask indicating the position of other relative to node. Read more on MDN
computedStyleMap
contains
Returns true if other is an inclusive descendant of node, and false otherwise. Read more on MDN
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
focus
getAnimations
Parameters
WebAPI.DOMAPI.htmlSelectElement option< WebAPI.DOMAPI.getAnimationsOptions >Return type
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
getAttributeNames
Returns the qualified names of all element's attributes. Can contain duplicates. Read more on MDN
getAttributeNode
getAttributeNodeNS
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
getBoundingClientRect
getClientRects
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
Parameters
WebAPI.DOMAPI.htmlSelectElement stringReturn type
WebAPI.DOMAPI.htmlCollectionOf< WebAPI.DOMAPI.element >getElementsByTagName
getElementsByTagNameNS
Parameters
WebAPI.DOMAPI.element string stringReturn type
WebAPI.DOMAPI.htmlCollectionOf< WebAPI.DOMAPI.element >getHTML
Parameters
WebAPI.DOMAPI.htmlSelectElement option< WebAPI.DOMAPI.getHTMLOptions >Return type
stringgetRootNode
Returns node's root. Read more on MDN
Parameters
WebAPI.DOMAPI.htmlSelectElement option< WebAPI.DOMAPI.getRootNodeOptions >Return type
WebAPI.DOMAPI.nodehasAttribute
Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise. Read more on MDN
hasAttributeNS
Returns true if element has an attribute whose namespace is namespace and local name is localName. Read more on MDN
hasAttributes
Returns true if element has attributes, and false otherwise. Read more on MDN
hasChildNodes
Returns whether node has children. Read more on MDN
insertAdjacentElement
Parameters
WebAPI.DOMAPI.htmlSelectElement WebAPI.DOMAPI.insertPosition WebAPI.DOMAPI.elementReturn type
WebAPI.DOMAPI.elementinsertAdjacentHTML
insertAdjacentText
insertBefore
isDefaultNamespace
isEqualNode
Returns whether node and otherNode have the same properties. Read more on MDN
isSameNode
item
Retrieves a select object or an object from an options collection. @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made. @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned. Read more on MDN
lookupNamespaceURI
matches
Returns true if matching selectors against element's root yields element, and false otherwise. Read more on MDN
namedItem
Retrieves a select object or an object from an options collection. @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made. Read more on MDN
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
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
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
querySelector
Returns the first element that is a descendant of node that matches selectors. Read more on MDN
querySelectorAll
Returns all element descendants of node that match selectors. Read more on MDN
releasePointerCapture
removeAttribute
Removes element's first attribute whose qualified name is qualifiedName. Read more on MDN
removeAttributeNode
removeAttributeNS
Removes element's attribute whose namespace is namespace and local name is localName. Read more on MDN
removeChild
removeEventListener
Removes the event listener in target's event listener list with the same type, callback, and options. Read more on MDN
Parameters
WebAPI.DOMAPI.htmlSelectElement WebAPI.EventAPI.eventType WebAPI.EventAPI.eventListener option< WebAPI.EventAPI.eventListenerOptions >Return type
unitremoveEventListener_useCapture
Removes the event listener in target's event listener list with the same type, callback, and options. Read more on MDN
Parameters
WebAPI.DOMAPI.htmlSelectElement WebAPI.EventAPI.eventType WebAPI.EventAPI.eventListenerReturn type
unitremoveH
Removes an element from the collection. @param index Number that specifies the zero-based index of the element to remove from the collection. Read more on MDN
removeH2
Removes an element from the collection. @param index Number that specifies the zero-based index of the element to remove from the collection. Read more on MDN
replaceChild
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
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
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
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
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
Parameters
WebAPI.DOMAPI.htmlSelectElement option< WebAPI.DOMAPI.fullscreenOptions >Return type
Promise.t< unit >requestPointerLock
Parameters
WebAPI.DOMAPI.htmlSelectElement option< WebAPI.DOMAPI.pointerLockOptions >Return type
Promise.t< unit >scroll
scrollBy
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()
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()
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 })
scrollTo
setAttribute
Sets the value of element's first attribute whose qualified name is qualifiedName to value. Read more on MDN
setAttributeNode
setAttributeNodeNS
setAttributeNS
Sets the value of element's attribute whose namespace is namespace and local name is localName to value. Read more on MDN
setCustomValidity
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
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