版博士V2.0程序
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

52 строки
1.8 KiB

  1. import IHTMLElement from '../html-element/IHTMLElement';
  2. import IHTMLFormElement from '../html-form-element/IHTMLFormElement';
  3. import IHTMLLabelElement from '../html-label-element/IHTMLLabelElement';
  4. import INodeList from '../node/INodeList';
  5. import IHTMLOptionsCollection from '../html-option-element/IHTMLOptionsCollection';
  6. import ValidityState from '../validity-state/ValidityState';
  7. import Event from '../../event/Event';
  8. import IHTMLOptionElement from '../html-option-element/IHTMLOptionElement';
  9. import IHTMLOptGroupElement from '../html-opt-group-element/IHTMLOptGroupElement';
  10. /**
  11. * HTML Select Element.
  12. *
  13. * Reference:
  14. * https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement.
  15. */
  16. export default interface IHTMLSelectElement extends IHTMLElement {
  17. readonly form: IHTMLFormElement;
  18. readonly labels: INodeList<IHTMLLabelElement>;
  19. readonly options: IHTMLOptionsCollection;
  20. readonly type: string;
  21. readonly validity: ValidityState;
  22. readonly willValidate: boolean;
  23. autofocus: boolean;
  24. disabled: boolean;
  25. length: number;
  26. selectedIndex: number;
  27. value: string;
  28. name: string;
  29. multiple: boolean;
  30. onchange: (event: Event) => void | null;
  31. oninput: (event: Event) => void | null;
  32. /**
  33. * Adds new option to collection.
  34. *
  35. * @param element HTMLOptionElement or HTMLOptGroupElement to add.
  36. * @param before HTMLOptionElement or index number.
  37. */
  38. add(element: IHTMLOptionElement | IHTMLOptGroupElement, before?: number | IHTMLOptionElement | IHTMLOptGroupElement): void;
  39. /**
  40. * Returns option element by index.
  41. *
  42. * @param index Index.
  43. */
  44. item(index: number): IHTMLOptionElement | IHTMLOptGroupElement;
  45. /**
  46. * Removes option element from the collection.
  47. *
  48. * @param index Index.
  49. */
  50. remove(index?: number): void;
  51. }