OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
15 * | 15 * |
16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
20 */ | 20 */ |
21 | 21 |
22 // https://html.spec.whatwg.org/#the-input-element | 22 // https://html.spec.whatwg.org/#the-input-element |
23 | 23 |
| 24 enum SelectionMode { "select", "start", "end", "preserve" }; |
| 25 |
24 interface HTMLInputElement : HTMLElement { | 26 interface HTMLInputElement : HTMLElement { |
25 [Reflect] attribute DOMString accept; | 27 [Reflect] attribute DOMString accept; |
26 [Reflect] attribute DOMString alt; | 28 [Reflect] attribute DOMString alt; |
27 [Reflect] attribute DOMString autocomplete; | 29 [Reflect] attribute DOMString autocomplete; |
28 [Reflect] attribute boolean autofocus; | 30 [Reflect] attribute boolean autofocus; |
29 [Reflect=checked] attribute boolean defaultChecked; | 31 [Reflect=checked] attribute boolean defaultChecked; |
30 attribute boolean checked; | 32 attribute boolean checked; |
31 [Reflect] attribute DOMString dirName; | 33 [Reflect] attribute DOMString dirName; |
32 [Reflect] attribute boolean disabled; | 34 [Reflect] attribute boolean disabled; |
33 [ImplementedAs=formOwner] readonly attribute HTMLFormElement? form; | 35 [ImplementedAs=formOwner] readonly attribute HTMLFormElement? form; |
34 // The 'files' attribute is intentionally not readonly. | 36 // The 'files' attribute is intentionally not readonly. |
35 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22682 | 37 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22682 |
36 attribute FileList? files; | 38 attribute FileList? files; |
37 [Reflect, URL] attribute DOMString formAction; | 39 attribute DOMString formAction; |
38 [CustomElementCallbacks] attribute DOMString formEnctype; | 40 [CustomElementCallbacks] attribute DOMString formEnctype; |
39 [CustomElementCallbacks] attribute DOMString formMethod; | 41 [CustomElementCallbacks] attribute DOMString formMethod; |
40 [Reflect] attribute boolean formNoValidate; | 42 [Reflect] attribute boolean formNoValidate; |
41 [Reflect] attribute DOMString formTarget; | 43 [Reflect] attribute DOMString formTarget; |
42 [CustomElementCallbacks] attribute unsigned long height; | 44 [CustomElementCallbacks] attribute unsigned long height; |
43 attribute boolean indeterminate; | 45 attribute boolean indeterminate; |
44 [RuntimeEnabled=InputModeAttribute, Reflect] attribute DOMString inputMode; | 46 [RuntimeEnabled=InputModeAttribute, Reflect] attribute DOMString inputMode; |
45 readonly attribute HTMLElement? list; | 47 readonly attribute HTMLElement? list; |
46 [Reflect] attribute DOMString max; | 48 [Reflect] attribute DOMString max; |
47 [RaisesException=Setter, CustomElementCallbacks] attribute long maxLength; | 49 [RaisesException=Setter, CustomElementCallbacks] attribute long maxLength; |
(...skipping 28 matching lines...) Expand all Loading... |
76 void setCustomValidity(DOMString error); | 78 void setCustomValidity(DOMString error); |
77 | 79 |
78 readonly attribute NodeList labels; | 80 readonly attribute NodeList labels; |
79 | 81 |
80 void select(); | 82 void select(); |
81 // FIXME: selectionStart and selectionEnd should be unsigned long. | 83 // FIXME: selectionStart and selectionEnd should be unsigned long. |
82 [RaisesException, ImplementedAs=selectionStartForBinding] attribute long sel
ectionStart; | 84 [RaisesException, ImplementedAs=selectionStartForBinding] attribute long sel
ectionStart; |
83 [RaisesException, ImplementedAs=selectionEndForBinding] attribute long selec
tionEnd; | 85 [RaisesException, ImplementedAs=selectionEndForBinding] attribute long selec
tionEnd; |
84 [RaisesException, ImplementedAs=selectionDirectionForBinding] attribute DOMS
tring selectionDirection; | 86 [RaisesException, ImplementedAs=selectionDirectionForBinding] attribute DOMS
tring selectionDirection; |
85 [RaisesException] void setRangeText(DOMString replacement); | 87 [RaisesException] void setRangeText(DOMString replacement); |
86 // FIXME: The selectionMode argument should be a SelectionMode enum. | |
87 [RaisesException] void setRangeText(DOMString replacement, | 88 [RaisesException] void setRangeText(DOMString replacement, |
88 unsigned long start, | 89 unsigned long start, |
89 unsigned long end, | 90 unsigned long end, |
90 optional DOMString selectionMode = "pres
erve"); | 91 optional SelectionMode selectionMode = "
preserve"); |
91 // FIXME: The start and end arguments should be unsigned long and should not
have [Default=Undefined]. | 92 // FIXME: The start and end arguments should be unsigned long and should not
have [Default=Undefined]. |
92 [RaisesException, ImplementedAs=setSelectionRangeForBinding] | 93 [RaisesException, ImplementedAs=setSelectionRangeForBinding] |
93 void setSelectionRange([Default=Undefined] optional long start, | 94 void setSelectionRange([Default=Undefined] optional long start, |
94 [Default=Undefined] optional long end, | 95 [Default=Undefined] optional long end, |
95 optional DOMString direction); | 96 optional DOMString direction); |
96 | 97 |
97 // obsolete members | 98 // obsolete members |
98 // https://html.spec.whatwg.org/#HTMLInputElement-partial | 99 // https://html.spec.whatwg.org/#HTMLInputElement-partial |
99 [Reflect] attribute DOMString align; | 100 [Reflect] attribute DOMString align; |
100 [Reflect] attribute DOMString useMap; | 101 [Reflect] attribute DOMString useMap; |
101 | 102 |
102 // HTML autocapitalize proposal | 103 // HTML autocapitalize proposal |
103 // https://github.com/mounirlamouri/html-autocapitalize/blob/master/proposal
.md | 104 // https://github.com/mounirlamouri/html-autocapitalize/blob/master/proposal
.md |
104 [Measure] attribute DOMString autocapitalize; | 105 [Measure] attribute DOMString autocapitalize; |
105 | 106 |
106 // HTML Media Capture | 107 // HTML Media Capture |
107 // http://www.w3.org/TR/html-media-capture/ | 108 // http://www.w3.org/TR/html-media-capture/ |
108 [RuntimeEnabled=MediaCapture, Reflect] attribute boolean capture; | 109 [RuntimeEnabled=MediaCapture, Reflect] attribute boolean capture; |
109 | 110 |
110 // Non-standard APIs | 111 // Non-standard APIs |
111 [Reflect, MeasureAs=PrefixedDirectoryAttribute] attribute boolean webkitdire
ctory; | 112 [Reflect, MeasureAs=PrefixedDirectoryAttribute] attribute boolean webkitdire
ctory; |
112 [Reflect, MeasureAs=IncrementalAttribute] attribute boolean incremental; | 113 [Reflect, MeasureAs=IncrementalAttribute] attribute boolean incremental; |
113 }; | 114 }; |
OLD | NEW |