|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import HTMLCollection from '../element/HTMLCollection';
- import IHTMLOptGroupElement from '../html-opt-group-element/IHTMLOptGroupElement';
- import IHTMLSelectElement from '../html-select-element/IHTMLSelectElement';
- import IHTMLOptionElement from './IHTMLOptionElement';
- import IHTMLOptionsCollection from './IHTMLOptionsCollection';
- /**
- * HTML Options Collection.
- *
- * Reference:
- * https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionsCollection.
- */
- export default class HTMLOptionsCollection extends HTMLCollection implements IHTMLOptionsCollection {
- private _selectElement;
- /**
- *
- * @param selectElement
- */
- constructor(selectElement: IHTMLSelectElement);
- /**
- * Returns selectedIndex.
- *
- * @returns SelectedIndex.
- */
- get selectedIndex(): number;
- /**
- * Sets selectedIndex.
- *
- * @param selectedIndex SelectedIndex.
- */
- set selectedIndex(selectedIndex: number);
- /**
- * Returns item by index.
- *
- * @param index Index.
- */
- item(index: number): IHTMLOptionElement | IHTMLOptGroupElement;
- /**
- *
- * @param element
- * @param before
- */
- add(element: IHTMLOptionElement | IHTMLOptGroupElement, before?: number | IHTMLOptionElement | IHTMLOptGroupElement): void;
- /**
- * Removes indexed element from collection.
- *
- * @param index Index.
- */
- remove(index: number): void;
- }
|