1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/interfaces/html/nsIDOMHTMLInputElement.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,108 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsIDOMHTMLElement.idl" 1.10 + 1.11 +interface nsIControllers; 1.12 +interface nsIDOMFileList; 1.13 +interface nsIDOMValidityState; 1.14 + 1.15 + /** 1.16 + * The nsIDOMHTMLInputElement interface is the interface to a [X]HTML 1.17 + * input element. 1.18 + * 1.19 + * This interface is trying to follow the DOM Level 2 HTML specification: 1.20 + * http://www.w3.org/TR/DOM-Level-2-HTML/ 1.21 + * 1.22 + * with changes from the work-in-progress WHATWG HTML specification: 1.23 + * http://www.whatwg.org/specs/web-apps/current-work/ 1.24 + */ 1.25 + 1.26 +[scriptable, uuid(64aeda0b-e9b5-4868-a4f9-e4776e32e733)] 1.27 +interface nsIDOMHTMLInputElement : nsISupports 1.28 +{ 1.29 + attribute DOMString accept; 1.30 + attribute DOMString alt; 1.31 + 1.32 + attribute DOMString autocomplete; 1.33 + attribute boolean autofocus; 1.34 + attribute boolean defaultChecked; 1.35 + attribute boolean checked; 1.36 + attribute boolean disabled; 1.37 + readonly attribute nsIDOMHTMLFormElement form; 1.38 + attribute DOMString formAction; 1.39 + attribute DOMString formEnctype; 1.40 + attribute DOMString formMethod; 1.41 + attribute boolean formNoValidate; 1.42 + attribute DOMString formTarget; 1.43 + 1.44 + readonly attribute nsIDOMFileList files; 1.45 + 1.46 + attribute unsigned long height; 1.47 + attribute boolean indeterminate; 1.48 + 1.49 + attribute DOMString inputMode; 1.50 + 1.51 + readonly attribute nsIDOMHTMLElement list; 1.52 + attribute DOMString max; 1.53 + attribute long maxLength; 1.54 + attribute DOMString min; 1.55 + 1.56 + attribute boolean multiple; 1.57 + attribute DOMString name; 1.58 + 1.59 + attribute DOMString pattern; 1.60 + attribute DOMString placeholder; 1.61 + attribute boolean readOnly; 1.62 + attribute boolean required; 1.63 + attribute DOMString step; 1.64 + 1.65 + attribute DOMString align; 1.66 + 1.67 + attribute unsigned long size; 1.68 + attribute unsigned long width; 1.69 + attribute DOMString src; 1.70 + 1.71 + attribute DOMString type; 1.72 + attribute DOMString defaultValue; 1.73 + attribute DOMString value; 1.74 + attribute double valueAsNumber; 1.75 + // valustAsDate is only supported via WebIDL, because it's intimately 1.76 + // tied to JS Date objects and xpidl support for that sort of thing is 1.77 + // terrible. 1.78 + 1.79 + [optional_argc] void stepDown([optional] in long n); 1.80 + [optional_argc] void stepUp([optional] in long n); 1.81 + 1.82 + // The following lines are part of the constraint validation API, see: 1.83 + // http://www.whatwg.org/specs/web-apps/current-work/#the-constraint-validation-api 1.84 + readonly attribute boolean willValidate; 1.85 + readonly attribute nsIDOMValidityState validity; 1.86 + readonly attribute DOMString validationMessage; 1.87 + boolean checkValidity(); 1.88 + void setCustomValidity(in DOMString error); 1.89 + 1.90 + void select(); 1.91 + attribute long selectionStart; 1.92 + attribute long selectionEnd; 1.93 + void setSelectionRange(in long selectionStart, in long selectionEnd, [optional] in DOMString direction); 1.94 + attribute DOMString selectionDirection; 1.95 + 1.96 + 1.97 + attribute DOMString useMap; 1.98 + readonly attribute nsIControllers controllers; 1.99 + readonly attribute long textLength; 1.100 + 1.101 + void mozGetFileNameArray([optional] out unsigned long aLength, 1.102 + [array,size_is(aLength), retval] out wstring aFileNames); 1.103 + void mozSetFileNameArray([array,size_is(aLength)] in wstring aFileNames, 1.104 + in unsigned long aLength); 1.105 + 1.106 + /** 1.107 + * This non-standard method prevents to check types manually to know if the 1.108 + * element is a text field. 1.109 + */ 1.110 + boolean mozIsTextField(in boolean aExcludePassword); 1.111 +};