Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsIDOMHTMLElement.idl" |
michael@0 | 7 | |
michael@0 | 8 | interface nsIControllers; |
michael@0 | 9 | interface nsIDOMFileList; |
michael@0 | 10 | interface nsIDOMValidityState; |
michael@0 | 11 | |
michael@0 | 12 | /** |
michael@0 | 13 | * The nsIDOMHTMLInputElement interface is the interface to a [X]HTML |
michael@0 | 14 | * input element. |
michael@0 | 15 | * |
michael@0 | 16 | * This interface is trying to follow the DOM Level 2 HTML specification: |
michael@0 | 17 | * http://www.w3.org/TR/DOM-Level-2-HTML/ |
michael@0 | 18 | * |
michael@0 | 19 | * with changes from the work-in-progress WHATWG HTML specification: |
michael@0 | 20 | * http://www.whatwg.org/specs/web-apps/current-work/ |
michael@0 | 21 | */ |
michael@0 | 22 | |
michael@0 | 23 | [scriptable, uuid(64aeda0b-e9b5-4868-a4f9-e4776e32e733)] |
michael@0 | 24 | interface nsIDOMHTMLInputElement : nsISupports |
michael@0 | 25 | { |
michael@0 | 26 | attribute DOMString accept; |
michael@0 | 27 | attribute DOMString alt; |
michael@0 | 28 | |
michael@0 | 29 | attribute DOMString autocomplete; |
michael@0 | 30 | attribute boolean autofocus; |
michael@0 | 31 | attribute boolean defaultChecked; |
michael@0 | 32 | attribute boolean checked; |
michael@0 | 33 | attribute boolean disabled; |
michael@0 | 34 | readonly attribute nsIDOMHTMLFormElement form; |
michael@0 | 35 | attribute DOMString formAction; |
michael@0 | 36 | attribute DOMString formEnctype; |
michael@0 | 37 | attribute DOMString formMethod; |
michael@0 | 38 | attribute boolean formNoValidate; |
michael@0 | 39 | attribute DOMString formTarget; |
michael@0 | 40 | |
michael@0 | 41 | readonly attribute nsIDOMFileList files; |
michael@0 | 42 | |
michael@0 | 43 | attribute unsigned long height; |
michael@0 | 44 | attribute boolean indeterminate; |
michael@0 | 45 | |
michael@0 | 46 | attribute DOMString inputMode; |
michael@0 | 47 | |
michael@0 | 48 | readonly attribute nsIDOMHTMLElement list; |
michael@0 | 49 | attribute DOMString max; |
michael@0 | 50 | attribute long maxLength; |
michael@0 | 51 | attribute DOMString min; |
michael@0 | 52 | |
michael@0 | 53 | attribute boolean multiple; |
michael@0 | 54 | attribute DOMString name; |
michael@0 | 55 | |
michael@0 | 56 | attribute DOMString pattern; |
michael@0 | 57 | attribute DOMString placeholder; |
michael@0 | 58 | attribute boolean readOnly; |
michael@0 | 59 | attribute boolean required; |
michael@0 | 60 | attribute DOMString step; |
michael@0 | 61 | |
michael@0 | 62 | attribute DOMString align; |
michael@0 | 63 | |
michael@0 | 64 | attribute unsigned long size; |
michael@0 | 65 | attribute unsigned long width; |
michael@0 | 66 | attribute DOMString src; |
michael@0 | 67 | |
michael@0 | 68 | attribute DOMString type; |
michael@0 | 69 | attribute DOMString defaultValue; |
michael@0 | 70 | attribute DOMString value; |
michael@0 | 71 | attribute double valueAsNumber; |
michael@0 | 72 | // valustAsDate is only supported via WebIDL, because it's intimately |
michael@0 | 73 | // tied to JS Date objects and xpidl support for that sort of thing is |
michael@0 | 74 | // terrible. |
michael@0 | 75 | |
michael@0 | 76 | [optional_argc] void stepDown([optional] in long n); |
michael@0 | 77 | [optional_argc] void stepUp([optional] in long n); |
michael@0 | 78 | |
michael@0 | 79 | // The following lines are part of the constraint validation API, see: |
michael@0 | 80 | // http://www.whatwg.org/specs/web-apps/current-work/#the-constraint-validation-api |
michael@0 | 81 | readonly attribute boolean willValidate; |
michael@0 | 82 | readonly attribute nsIDOMValidityState validity; |
michael@0 | 83 | readonly attribute DOMString validationMessage; |
michael@0 | 84 | boolean checkValidity(); |
michael@0 | 85 | void setCustomValidity(in DOMString error); |
michael@0 | 86 | |
michael@0 | 87 | void select(); |
michael@0 | 88 | attribute long selectionStart; |
michael@0 | 89 | attribute long selectionEnd; |
michael@0 | 90 | void setSelectionRange(in long selectionStart, in long selectionEnd, [optional] in DOMString direction); |
michael@0 | 91 | attribute DOMString selectionDirection; |
michael@0 | 92 | |
michael@0 | 93 | |
michael@0 | 94 | attribute DOMString useMap; |
michael@0 | 95 | readonly attribute nsIControllers controllers; |
michael@0 | 96 | readonly attribute long textLength; |
michael@0 | 97 | |
michael@0 | 98 | void mozGetFileNameArray([optional] out unsigned long aLength, |
michael@0 | 99 | [array,size_is(aLength), retval] out wstring aFileNames); |
michael@0 | 100 | void mozSetFileNameArray([array,size_is(aLength)] in wstring aFileNames, |
michael@0 | 101 | in unsigned long aLength); |
michael@0 | 102 | |
michael@0 | 103 | /** |
michael@0 | 104 | * This non-standard method prevents to check types manually to know if the |
michael@0 | 105 | * element is a text field. |
michael@0 | 106 | */ |
michael@0 | 107 | boolean mozIsTextField(in boolean aExcludePassword); |
michael@0 | 108 | }; |