2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
23 interface HTMLInputElement : HTMLElement {
24 attribute [ConvertNullToNullString] DOMString defaultValue;
25 attribute [Reflect=checked] boolean defaultChecked;
26 readonly attribute HTMLFormElement form;
27 attribute [Reflect, URL] DOMString formAction;
28 attribute [Reflect] DOMString formEnctype;
29 attribute [Reflect] DOMString formMethod;
30 attribute [Reflect] boolean formNoValidate;
31 attribute [Reflect] DOMString formTarget;
32 readonly attribute ValidityState validity;
33 attribute [Reflect] DOMString accept;
34 attribute [Reflect] DOMString accessKey;
35 attribute [Reflect] DOMString align;
36 attribute [Reflect] DOMString alt;
37 attribute boolean checked;
38 attribute [Reflect] boolean disabled;
39 attribute [Reflect] boolean autofocus;
40 attribute [Reflect] DOMString autocomplete;
41 readonly attribute [Conditional=DATALIST] HTMLElement list;
42 attribute [Reflect] DOMString max;
43 attribute long maxLength setter raises(DOMException);
44 attribute [Reflect] DOMString min;
45 attribute [Reflect] boolean multiple;
46 attribute [Conditional=DIRECTORY_UPLOAD, Reflect] boolean webkitdirectory;
47 attribute [Reflect] DOMString name;
48 attribute [Reflect] DOMString pattern;
49 attribute [Reflect] DOMString placeholder;
50 attribute [Reflect] boolean readOnly;
51 attribute [Reflect] boolean required;
52 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
53 attribute [ConvertToString] DOMString size; // DOM level 2 changed this to a long, but our existing API is a string
55 // FIXME: The spec says this should be a long, not an unsigned long.
56 attribute unsigned long size; // Changed string -> long as part of DOM level 2
58 attribute [Reflect, URL] DOMString src;
59 attribute [Reflect] DOMString step;
60 attribute [ConvertNullToNullString] DOMString type; // readonly dropped as part of DOM level 2
61 attribute [Reflect] DOMString useMap;
62 attribute [ConvertNullToNullString] DOMString value;
63 #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
64 attribute Date valueAsDate setter raises(DOMException);
66 attribute double valueAsNumber setter raises(DOMException);
67 readonly attribute [Conditional=DATALIST] HTMLOptionElement selectedOption;
68 attribute [Reflect] boolean incremental;
70 void stepUp(in [Optional] long n) raises(DOMException);
71 void stepDown(in [Optional] long n) raises(DOMException);
73 readonly attribute boolean willValidate;
74 readonly attribute DOMString validationMessage;
75 boolean checkValidity();
76 void setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error);
80 #if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT
81 void setValueForUser(in [ConvertNullToNullString] DOMString value);
85 attribute boolean indeterminate;
87 attribute [Custom] long selectionStart;
88 attribute [Custom] long selectionEnd;
89 attribute [Custom] DOMString selectionDirection;
91 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
92 [Custom] void setSelectionRange(in long start, in long end);
94 [Custom] void setSelectionRange(in [Optional=CallWithDefaultValue] long start,
95 in [Optional=CallWithDefaultValue] long end,
96 in [Optional] DOMString direction);
99 #if defined(LANGUAGE_OBJECTIVE_C)
100 // Objective-C extension:
101 readonly attribute DOMString altDisplayString;
102 readonly attribute URL absoluteImageURL;
105 readonly attribute FileList files;
106 readonly attribute NodeList labels;
108 attribute [Conditional=INPUT_SPEECH, Reflect, EnabledAtRuntime] boolean webkitSpeech;
109 attribute [Conditional=INPUT_SPEECH, Reflect, EnabledAtRuntime] boolean webkitGrammar;
110 attribute [Conditional=INPUT_SPEECH, DontEnum] EventListener onwebkitspeechchange;