import HTMLSelectElement from 'html-document/src/HTMLElement/elements/HTMLSelectElement.js'
HTMLSelectElement
Extends:
HTML select elements share all of the properties and methods of other HTML elements described in the element section. They also have the specialized interface HTMLSelectElement.
Member Summary
Public Members | ||
public get |
Is a Boolean that reflects the autofocus HTML attribute, which indicates whether the control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. |
|
public set |
|
|
public set |
|
|
public get |
Is a Boolean that reflects the disabled HTML attribute, which indicates whether the control is disabled. |
|
public set |
form: * |
|
public get |
form: HTMLFormElement The form that this element is associated with. |
|
public get |
labels: HTMLLabelElement[] Returns a NodeList containing the list of label elements associated with this select element. |
|
public set |
length: * |
|
public get |
The number of option elements in this select element. |
|
public set |
|
|
public get |
Reflects the multiple HTML attribute, which indicates whether multiple items can be selected. |
|
public get |
Reflects the name HTML attribute, containing the name of this control used by servers and DOM search functions. |
|
public set |
|
|
public get |
The set of option elements contained by this element. |
|
public set |
options: * |
|
public get |
Reflects the required HTML attribute, which indicates whether the user is required to select a value before submitting the form |
|
public set |
required: * |
|
public get |
The index of the first selected option element. |
|
public set |
selectedIndex(index: number): * |
|
public get |
selectedOption: HtmlOptionElement | null The first selected option. |
|
public get |
The set of options that are selected. |
|
public get |
Reflects the size HTML attribute, which contains the number of visible items in the control. |
|
public set |
|
|
public get |
|
|
public get |
The form control's type. When multiple is true, it returns select-multiple; otherwise, it returns select-one. Read only. |
|
public set |
type: * |
|
public get |
|
|
public set |
|
|
public get |
|
|
public set |
validity: * |
|
public get |
The value of this form control, that is, of the first selected option. |
|
public get |
|
|
public set |
willValidate: * |
Method Summary
Public Methods | ||
public |
Gets an item from the options collection for this select element. |
Inherited Summary
From class Node | ||
public get |
|
|
public set |
nodeValue(value: *): * |
|
public get |
Returns the Document that this node belongs to. |
|
public get |
|
|
public |
addEventListener(eventType: string, listener: function, capturingPhase: boolean): * |
|
public |
dispatchEvent(event: Event): boolean |
|
public |
getAttribute(attributeName: string): string get attribute's value |
|
public |
hasAttribute(attributeName: string): boolean checks if attribute exists for node |
|
public |
removeAttribute(attributeName: string) remove attribute |
|
public |
removeEventListener(eventType: string, listener: function, capturingPhase: boolean): boolean |
|
public |
setAttribute(attributeName: string, attributeValue: string) set attribute's value |
From class ParentNode | ||
public get |
childNodes: Node[] TODO return {HTMLCollection} |
|
public get |
firstChild: Node | null |
|
public get |
|
|
public get |
nextSibling: Node | null |
|
public get |
parentNode: Node | null |
|
public get |
|
|
public |
appendChild(child: Node): Node |
|
public |
Clone a Node, and optionally, all of its contents. |
|
public |
Method returns true if node has child nodes. |
|
public |
insertBefore(child: Node, existingChild: Node): Node |
|
public |
removeChild(toRemoveChild: Node): Node |
|
public |
replaceChild(newChild: Node, oldChild: Node): Node |
|
protected |
_createCollection(selector: *): * Inner method to create new live HTMLCollection. |
From class Element | ||
public get |
attributes: * |
|
public get |
Returns an unsigned long giving the amount of children that the object has. |
|
public get |
Returns a live HTMLCollection containing all objects of type Element that are children of this ParentNode. |
|
public get |
Returns the Element that is the first child of this ParentNode, or null if there is none. |
|
public get |
The id of the element. |
|
public set |
|
|
public get |
Returns the Element that is the first child of this ParentNode, or null if there is none. |
|
public get |
Returns the Element immediately following the specified one in its parent's children list, or null if the specified element is the last one in the list. |
|
public get |
Returns the Element immediately prior to the specified one in its parent's children list, or null if the specified element is the first one in the list. |
|
public get |
The tag name of the element. |
|
public |
getElementById(id: string): Element Returns a reference to the element by its ID. |
|
public |
getElementsByClassName(names: string): HTMLCollection The Element.getElementsByClassName() method returns a live HTMLCollection containing all child elements which have all of the given class names. |
|
public |
getElementsByTagName(tagName: string): HTMLCollection Returns an HTMLCollection of elements with the given tag name. |
|
public |
querySelector(query: string): Element | null Returns the first element that is a descendant of the element on which it is invoked that matches the specified group of selectors. |
|
public |
querySelectorAll(query: string): Element[] Returns a non-live NodeList of all elements descended from the element on which it is invoked that match the specified group of CSS selectors. |
From class HTMLElement | ||
public get |
The class of the element. |
|
public set |
|
|
public get |
dataset: * |
|
public |
returns a token list of the class attribute of the element |
|
public |
returns a token list of the class attribute of the element |
Public Members
public get autoFocus: boolean source
Is a Boolean that reflects the autofocus HTML attribute, which indicates whether the control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. Only one form-associated element in a document can have this attribute specified
public get disabled: boolean source
Is a Boolean that reflects the disabled HTML attribute, which indicates whether the control is disabled. If it is disabled, it does not accept clicks.
public set form: * source
public get form: HTMLFormElement source
The form that this element is associated with. If this element is a descendant of a form element, then this attribute is the ID of that form element. If the element is not a descendant of a form element, then: The attribute can be the ID of any form element in the same document.
public get labels: HTMLLabelElement[] source
Returns a NodeList containing the list of label elements associated with this select element.
public set length: * source
public get multiple: boolean source
Reflects the multiple HTML attribute, which indicates whether multiple items can be selected.
public get name: string source
Reflects the name HTML attribute, containing the name of this control used by servers and DOM search functions.
public set options: * source
public get required: boolean source
Reflects the required HTML attribute, which indicates whether the user is required to select a value before submitting the form
public set required: * source
public get selectedIndex: number source
The index of the first selected option element. The value -1 is returned if no element is selected.
public get size: number source
Reflects the size HTML attribute, which contains the number of visible items in the control. The default is 1, unless multiple is true, in which case it is 4.
public get tabIndex source
public get type: string source
The form control's type. When multiple is true, it returns select-multiple; otherwise, it returns select-one. Read only.
public set type: * source
public get validationMessage source
public set validationMessage: * source
public get validity source
public set validity: * source
public get value: string source
The value of this form control, that is, of the first selected option.