import IHTMLElement from '../html-element/IHTMLElement'; import IHTMLFormElement from '../html-form-element/IHTMLFormElement'; import IHTMLLabelElement from '../html-label-element/IHTMLLabelElement'; import INodeList from '../node/INodeList'; import IHTMLOptionsCollection from '../html-option-element/IHTMLOptionsCollection'; import ValidityState from '../validity-state/ValidityState'; import Event from '../../event/Event'; import IHTMLOptionElement from '../html-option-element/IHTMLOptionElement'; import IHTMLOptGroupElement from '../html-opt-group-element/IHTMLOptGroupElement'; /** * HTML Select Element. * * Reference: * https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement. */ export default interface IHTMLSelectElement extends IHTMLElement { readonly form: IHTMLFormElement; readonly labels: INodeList; readonly options: IHTMLOptionsCollection; readonly type: string; readonly validity: ValidityState; readonly willValidate: boolean; autofocus: boolean; disabled: boolean; length: number; selectedIndex: number; value: string; name: string; multiple: boolean; onchange: (event: Event) => void | null; oninput: (event: Event) => void | null; /** * Adds new option to collection. * * @param element HTMLOptionElement or HTMLOptGroupElement to add. * @param before HTMLOptionElement or index number. */ add(element: IHTMLOptionElement | IHTMLOptGroupElement, before?: number | IHTMLOptionElement | IHTMLOptGroupElement): void; /** * Returns option element by index. * * @param index Index. */ item(index: number): IHTMLOptionElement | IHTMLOptGroupElement; /** * Removes option element from the collection. * * @param index Index. */ remove(index?: number): void; }