nsIDOMHTMLInputElement.idl 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #include "nsIDOMHTMLElement.idl"
  6. interface nsIControllers;
  7. interface nsIDOMFileList;
  8. interface nsIDOMValidityState;
  9. /**
  10. * The nsIDOMHTMLInputElement interface is the interface to a [X]HTML
  11. * input element.
  12. *
  13. * This interface is trying to follow the DOM Level 2 HTML specification:
  14. * http://www.w3.org/TR/DOM-Level-2-HTML/
  15. *
  16. * with changes from the work-in-progress WHATWG HTML specification:
  17. * http://www.whatwg.org/specs/web-apps/current-work/
  18. */
  19. [uuid(64aeda0b-e9b5-4868-a4f9-e4776e32e733)]
  20. interface nsIDOMHTMLInputElement : nsISupports
  21. {
  22. attribute DOMString accept;
  23. attribute DOMString alt;
  24. attribute DOMString autocomplete;
  25. attribute boolean autofocus;
  26. attribute boolean defaultChecked;
  27. attribute boolean checked;
  28. attribute boolean disabled;
  29. readonly attribute nsIDOMHTMLFormElement form;
  30. attribute DOMString formAction;
  31. attribute DOMString formEnctype;
  32. attribute DOMString formMethod;
  33. attribute boolean formNoValidate;
  34. attribute DOMString formTarget;
  35. readonly attribute nsIDOMFileList files;
  36. attribute unsigned long height;
  37. attribute boolean indeterminate;
  38. attribute DOMString inputMode;
  39. readonly attribute nsIDOMHTMLElement list;
  40. attribute DOMString max;
  41. attribute long maxLength;
  42. attribute DOMString min;
  43. attribute long minLength;
  44. attribute boolean multiple;
  45. attribute DOMString name;
  46. attribute DOMString pattern;
  47. attribute DOMString placeholder;
  48. attribute boolean readOnly;
  49. attribute boolean required;
  50. attribute DOMString step;
  51. attribute DOMString align;
  52. attribute unsigned long size;
  53. attribute unsigned long width;
  54. attribute DOMString src;
  55. attribute DOMString type;
  56. attribute DOMString defaultValue;
  57. attribute DOMString value;
  58. attribute double valueAsNumber;
  59. // valustAsDate is only supported via WebIDL, because it's intimately
  60. // tied to JS Date objects and xpidl support for that sort of thing is
  61. // terrible.
  62. [optional_argc] void stepDown([optional] in long n);
  63. [optional_argc] void stepUp([optional] in long n);
  64. // The following lines are part of the constraint validation API, see:
  65. // http://www.whatwg.org/specs/web-apps/current-work/#the-constraint-validation-api
  66. readonly attribute boolean willValidate;
  67. readonly attribute nsIDOMValidityState validity;
  68. readonly attribute DOMString validationMessage;
  69. boolean checkValidity();
  70. void setCustomValidity(in DOMString error);
  71. void select();
  72. attribute long selectionStart;
  73. attribute long selectionEnd;
  74. void setSelectionRange(in long selectionStart, in long selectionEnd, [optional] in DOMString direction);
  75. attribute DOMString selectionDirection;
  76. attribute DOMString useMap;
  77. readonly attribute nsIControllers controllers;
  78. readonly attribute long textLength;
  79. void mozGetFileNameArray([optional] out unsigned long aLength,
  80. [array,size_is(aLength), retval] out wstring aFileNames);
  81. void mozSetFileNameArray([array,size_is(aLength)] in wstring aFileNames,
  82. in unsigned long aLength);
  83. /**
  84. * This non-standard method prevents to check types manually to know if the
  85. * element is a text field.
  86. */
  87. boolean mozIsTextField(in boolean aExcludePassword);
  88. };