版博士V2.0程序
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

IHTMLOptionsCollection.d.ts 1.1 KiB

1234567891011121314151617181920212223242526272829303132
  1. import IHTMLCollection from '../element/IHTMLCollection';
  2. import IHTMLOptGroupElement from '../html-opt-group-element/IHTMLOptGroupElement';
  3. import IHTMLOptionElement from './IHTMLOptionElement';
  4. /**
  5. * HTML Options Collection.
  6. *
  7. * Reference:
  8. * https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionsCollection.
  9. */
  10. export default interface IHTMLOptionsCollection extends IHTMLCollection<IHTMLOptionElement | IHTMLOptGroupElement> {
  11. selectedIndex: number;
  12. length: number;
  13. /**
  14. * Adds new option to collection.
  15. *
  16. * @param element HTMLOptionElement or HTMLOptGroupElement to add.
  17. * @param before HTMLOptionElement or index number.
  18. */
  19. add(element: IHTMLOptionElement | IHTMLOptGroupElement, before?: number | IHTMLOptionElement | IHTMLOptGroupElement): void;
  20. /**
  21. * Returns option element by index.
  22. *
  23. * @param index Index.
  24. */
  25. item(index: number): IHTMLOptionElement | IHTMLOptGroupElement;
  26. /**
  27. * Removes option element from the collection.
  28. *
  29. * @param index Index.
  30. */
  31. remove(index: number): void;
  32. }