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) 2013 Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2013 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 // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-elemen
t.html#htmlselectelement | 22 // https://html.spec.whatwg.org/#the-select-element |
23 | 23 |
24 interface HTMLSelectElement : HTMLElement { | 24 interface HTMLSelectElement : HTMLElement { |
| 25 // TODO(philipj): attribute DOMString autocomplete; |
25 [Reflect] attribute boolean autofocus; | 26 [Reflect] attribute boolean autofocus; |
26 [Reflect] attribute boolean disabled; | 27 [Reflect] attribute boolean disabled; |
27 [ImplementedAs=formOwner] readonly attribute HTMLFormElement form; | 28 [ImplementedAs=formOwner] readonly attribute HTMLFormElement? form; |
28 attribute boolean multiple; | 29 attribute boolean multiple; |
29 [Reflect] attribute DOMString name; | 30 [Reflect] attribute DOMString name; |
30 [Reflect] attribute boolean required; | 31 [Reflect] attribute boolean required; |
| 32 // TODO(philipj): size should be unsigned long. |
31 attribute long size; | 33 attribute long size; |
32 | 34 |
33 readonly attribute DOMString type; | 35 readonly attribute DOMString type; |
34 | 36 |
35 readonly attribute HTMLOptionsCollection options; | 37 readonly attribute HTMLOptionsCollection options; |
| 38 // TODO(philipj): The length setter should never throw. |
36 [RaisesException=Setter] attribute unsigned long length; | 39 [RaisesException=Setter] attribute unsigned long length; |
37 | 40 getter Element? item(unsigned long index); |
38 getter Element item(unsigned long index); | 41 // TODO(philipj): The name argument should not be optional. |
39 Element namedItem([Default=Undefined] optional DOMString name); | 42 HTMLOptionElement? namedItem([Default=Undefined] optional DOMString name); |
40 [RaisesException, TypeChecking=Interface] void add((HTMLOptionElement or HTM
LOptGroupElement) element, | 43 [RaisesException, TypeChecking=Interface] void add((HTMLOptionElement or HTM
LOptGroupElement) element, |
41 optional (HTMLElement or
long)? before = null); | 44 optional (HTMLElement or
long)? before = null); |
42 [RaisesException] void remove(); // ChildNode overload | 45 [RaisesException] void remove(); // ChildNode overload |
43 void remove(long index); | 46 void remove(long index); |
44 [RaisesException, TypeChecking=Interface] setter HTMLOptionElement (unsigned
long index, HTMLOptionElement? value); | 47 [RaisesException, TypeChecking=Interface] setter void (unsigned long index,
HTMLOptionElement? option); |
45 | 48 |
46 readonly attribute HTMLCollection selectedOptions; | 49 readonly attribute HTMLCollection selectedOptions; |
47 attribute long selectedIndex; | 50 attribute long selectedIndex; |
48 attribute DOMString value; | 51 attribute DOMString value; |
49 | 52 |
50 readonly attribute boolean willValidate; | 53 readonly attribute boolean willValidate; |
51 readonly attribute ValidityState validity; | 54 readonly attribute ValidityState validity; |
52 readonly attribute DOMString validationMessage; | 55 readonly attribute DOMString validationMessage; |
53 boolean checkValidity(); | 56 boolean checkValidity(); |
54 boolean reportValidity(); | 57 boolean reportValidity(); |
| 58 // TODO(philipj): The error argument should not be nullable. |
55 void setCustomValidity([TreatUndefinedAs=NullString] DOMString? error); | 59 void setCustomValidity([TreatUndefinedAs=NullString] DOMString? error); |
56 | 60 |
57 readonly attribute NodeList labels; | 61 readonly attribute NodeList labels; |
58 }; | 62 }; |
OLD | NEW |