2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / WebCore / html / HTMLSelectElement.idl
blobd3e85a8376ceb4153a4e87a715a5e361919b5ed8
1 /*
2 * Copyright (C) 2006 Apple Computer, Inc.
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.
21 module html {
23 interface [
24 HasIndexGetter,
25 HasCustomIndexSetter,
26 GenerateConstructor,
27 InterfaceUUID=99013cd3-d644-4bb5-86a3-2e743821383b,
28 ImplementationUUID=afe20462-588d-469a-9b4c-8879c4a461d5
29 ] HTMLSelectElement : HTMLElement {
31 readonly attribute DOMString type;
32 attribute long selectedIndex;
33 attribute [ConvertNullToNullString] DOMString value;
35 // Modified in DOM Level 2:
36 #if defined(LANGUAGE_OBJECTIVE_C)
37 readonly attribute long length;
38 #else
39 attribute unsigned long length
40 setter raises (DOMException);
41 #endif
43 readonly attribute HTMLFormElement form;
44 readonly attribute boolean willValidate;
46 // Modified in DOM Level 2:
47 readonly attribute HTMLOptionsCollection options;
49 attribute boolean disabled;
50 attribute boolean autofocus;
51 attribute boolean multiple;
52 attribute [ConvertNullToNullString] DOMString name;
53 attribute long size;
55 [OldStyleObjC] void add(in HTMLElement element,
56 in HTMLElement before)
57 raises(DOMException);
59 #if defined(LANGUAGE_JAVASCRIPT)
60 // In JS, we support both options index and options object parameters - this cannot be autogenerated now.
61 [Custom] void remove(/* 1 */);
62 #else
63 void remove(in long index);
64 #endif
66 // These methods are not in DOM Level 2 IDL, but are mentioned in the standard:
67 // "The contained options can be directly accessed through the select element as a collection."
68 Node item(in [IsIndex] unsigned long index);
69 Node namedItem(in DOMString name);