版博士V2.0程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

45 lines
1.3 KiB

  1. import HTMLElement from '../html-element/HTMLElement';
  2. import IHTMLElement from '../html-element/IHTMLElement';
  3. import IHTMLFormElement from '../html-form-element/IHTMLFormElement';
  4. import IHTMLLabelElement from './IHTMLLabelElement';
  5. /**
  6. * HTML Label Element.
  7. *
  8. * Reference:
  9. * https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement.
  10. */
  11. export default class HTMLLabelElement extends HTMLElement implements IHTMLLabelElement {
  12. /**
  13. * Returns a string containing the ID of the labeled control. This reflects the "for" attribute.
  14. *
  15. * @returns ID of the labeled control.
  16. */
  17. get htmlFor(): string;
  18. /**
  19. * Sets a string containing the ID of the labeled control. This reflects the "for" attribute.
  20. *
  21. * @param htmlFor ID of the labeled control.
  22. */
  23. set htmlFor(htmlFor: string);
  24. /**
  25. * Returns an HTML element representing the control with which the label is associated.
  26. *
  27. * @returns Control element.
  28. */
  29. get control(): IHTMLElement;
  30. /**
  31. * Returns the parent form element.
  32. *
  33. * @returns Form.
  34. */
  35. get form(): IHTMLFormElement;
  36. /**
  37. * Clones a node.
  38. *
  39. * @override
  40. * @param [deep=false] "true" to clone deep.
  41. * @returns Cloned node.
  42. */
  43. cloneNode(deep?: boolean): IHTMLLabelElement;
  44. }