1 /* 2 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig (at) gmail.com> 4 * 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. 9 * 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. 14 * 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. 19 */ 20 21 module html { 22 23 interface [ 24 HasIndexGetter, 25 HasCustomIndexSetter 26 ] HTMLSelectElement : HTMLElement { 27 28 readonly attribute DOMString type; 29 attribute long selectedIndex; 30 attribute [ConvertNullToNullString] DOMString value; 31 32 // Modified in DOM Level 2: 33 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C 34 readonly attribute long length; 35 #else 36 attribute unsigned long length 37 setter raises (DOMException); 38 #endif 39 40 readonly attribute HTMLFormElement form; 41 readonly attribute ValidityState validity; 42 readonly attribute boolean willValidate; 43 readonly attribute DOMString validationMessage; 44 boolean checkValidity(); 45 void setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error); 46 47 // Modified in DOM Level 2: 48 readonly attribute HTMLOptionsCollection options; 49 50 attribute boolean disabled; 51 attribute boolean autofocus; 52 attribute boolean multiple; 53 attribute [ConvertNullToNullString] DOMString name; 54 attribute long size; 55 56 [OldStyleObjC] void add(in HTMLElement element, 57 in HTMLElement before) 58 raises(DOMException); 59 60 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT 61 // In JS, we support both options index and options object parameters - this cannot be autogenerated now. 62 [Custom] void remove(/* 1 */); 63 #else 64 void remove(in long index); 65 #endif 66 67 // These methods are not in DOM Level 2 IDL, but are mentioned in the standard: 68 // "The contained options can be directly accessed through the select element as a collection." 69 Node item(in [IsIndex] unsigned long index); 70 Node namedItem(in DOMString name); 71 }; 72 73 } 74