Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
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/. */
6 #include "nsIDOMHTMLElement.idl"
8 interface nsIControllers;
9 interface nsIDOMFileList;
10 interface nsIDOMValidityState;
12 /**
13 * The nsIDOMHTMLInputElement interface is the interface to a [X]HTML
14 * input element.
15 *
16 * This interface is trying to follow the DOM Level 2 HTML specification:
17 * http://www.w3.org/TR/DOM-Level-2-HTML/
18 *
19 * with changes from the work-in-progress WHATWG HTML specification:
20 * http://www.whatwg.org/specs/web-apps/current-work/
21 */
23 [scriptable, uuid(64aeda0b-e9b5-4868-a4f9-e4776e32e733)]
24 interface nsIDOMHTMLInputElement : nsISupports
25 {
26 attribute DOMString accept;
27 attribute DOMString alt;
29 attribute DOMString autocomplete;
30 attribute boolean autofocus;
31 attribute boolean defaultChecked;
32 attribute boolean checked;
33 attribute boolean disabled;
34 readonly attribute nsIDOMHTMLFormElement form;
35 attribute DOMString formAction;
36 attribute DOMString formEnctype;
37 attribute DOMString formMethod;
38 attribute boolean formNoValidate;
39 attribute DOMString formTarget;
41 readonly attribute nsIDOMFileList files;
43 attribute unsigned long height;
44 attribute boolean indeterminate;
46 attribute DOMString inputMode;
48 readonly attribute nsIDOMHTMLElement list;
49 attribute DOMString max;
50 attribute long maxLength;
51 attribute DOMString min;
53 attribute boolean multiple;
54 attribute DOMString name;
56 attribute DOMString pattern;
57 attribute DOMString placeholder;
58 attribute boolean readOnly;
59 attribute boolean required;
60 attribute DOMString step;
62 attribute DOMString align;
64 attribute unsigned long size;
65 attribute unsigned long width;
66 attribute DOMString src;
68 attribute DOMString type;
69 attribute DOMString defaultValue;
70 attribute DOMString value;
71 attribute double valueAsNumber;
72 // valustAsDate is only supported via WebIDL, because it's intimately
73 // tied to JS Date objects and xpidl support for that sort of thing is
74 // terrible.
76 [optional_argc] void stepDown([optional] in long n);
77 [optional_argc] void stepUp([optional] in long n);
79 // The following lines are part of the constraint validation API, see:
80 // http://www.whatwg.org/specs/web-apps/current-work/#the-constraint-validation-api
81 readonly attribute boolean willValidate;
82 readonly attribute nsIDOMValidityState validity;
83 readonly attribute DOMString validationMessage;
84 boolean checkValidity();
85 void setCustomValidity(in DOMString error);
87 void select();
88 attribute long selectionStart;
89 attribute long selectionEnd;
90 void setSelectionRange(in long selectionStart, in long selectionEnd, [optional] in DOMString direction);
91 attribute DOMString selectionDirection;
94 attribute DOMString useMap;
95 readonly attribute nsIControllers controllers;
96 readonly attribute long textLength;
98 void mozGetFileNameArray([optional] out unsigned long aLength,
99 [array,size_is(aLength), retval] out wstring aFileNames);
100 void mozSetFileNameArray([array,size_is(aLength)] in wstring aFileNames,
101 in unsigned long aLength);
103 /**
104 * This non-standard method prevents to check types manually to know if the
105 * element is a text field.
106 */
107 boolean mozIsTextField(in boolean aExcludePassword);
108 };