Home | History | Annotate | Download | only in html
      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 HTMLInputElement : HTMLElement {
     24                  attribute [ConvertNullToNullString] DOMString defaultValue;
     25                  attribute boolean         defaultChecked;
     26         readonly attribute HTMLFormElement form;
     27                  attribute boolean         formNoValidate;
     28         readonly attribute ValidityState   validity;
     29                  attribute [ConvertNullToNullString] DOMString accept;
     30                  attribute [ConvertNullToNullString] DOMString accessKey;
     31                  attribute [ConvertNullToNullString] DOMString align;
     32                  attribute [ConvertNullToNullString] DOMString alt;
     33                  attribute boolean         checked;
     34                  attribute boolean         disabled;
     35                  attribute boolean         autofocus;
     36 #if defined(ENABLE_DATALIST) && ENABLE_DATALIST
     37         readonly attribute HTMLElement     list;
     38 #endif
     39                  attribute [ConvertNullToNullString, Reflect] DOMString max;
     40                  attribute long            maxLength
     41                      setter raises(DOMException);
     42                  attribute [ConvertNullToNullString, Reflect] DOMString min;
     43                  attribute boolean         multiple;
     44                  attribute [ConvertNullToNullString] DOMString name;
     45                  attribute [ConvertNullToNullString, Reflect] DOMString pattern;
     46                  attribute DOMString       placeholder;
     47                  attribute boolean         readOnly;
     48                  attribute boolean         required;
     49 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
     50                  attribute [ConvertToString] DOMString size; // DOM level 2 changed this to a long, but our existing API is a string
     51 #else
     52                  // FIXME: the spec says this should be a long, not an unsigned long
     53                  attribute unsigned long   size; // Changed string -> long as part of DOM level 2
     54 #endif
     55                  attribute [ConvertNullToNullString] DOMString src;
     56                  attribute [ConvertNullToNullString, Reflect] DOMString step;
     57                  attribute [ConvertNullToNullString, JSCCustomGetter] DOMString type; // readonly dropped as part of DOM level 2
     58                  attribute [ConvertNullToNullString] DOMString useMap;
     59                  attribute [ConvertNullToNullString] DOMString value;
     60                  attribute Date            valueAsDate setter raises(DOMException);
     61                  attribute double          valueAsNumber setter raises(DOMException);
     62 #if defined(ENABLE_DATALIST) && ENABLE_DATALIST
     63         readonly attribute HTMLOptionElement selectedOption;
     64 #endif
     65 
     66         void               stepUp(in [Optional] long n)
     67             raises(DOMException);
     68         void               stepDown(in [Optional] long n)
     69             raises(DOMException);
     70 
     71         readonly attribute boolean         willValidate;
     72         readonly attribute DOMString       validationMessage;
     73         boolean            checkValidity();
     74         void               setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error);
     75         void               select();
     76         void               click();
     77 
     78 #if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT
     79         void               setValueForUser(in [ConvertNullToNullString] DOMString value);
     80 #endif
     81 
     82         // WinIE extension:
     83                  attribute boolean         indeterminate;
     84 
     85         // WinIE & FireFox extension:
     86 
     87                  attribute [Custom] long selectionStart;
     88                  attribute [Custom] long selectionEnd;
     89         [Custom] void setSelectionRange(in long start, in long end);
     90 
     91 #if defined(LANGUAGE_OBJECTIVE_C)
     92         // Objective-C extension:
     93         readonly attribute DOMString       altDisplayString;
     94         readonly attribute URL             absoluteImageURL;
     95 #endif
     96 
     97         readonly attribute FileList files;
     98     };
     99 
    100 }
    101