michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIDOMHTMLElement.idl" michael@0: michael@0: interface nsIControllers; michael@0: interface nsIDOMFileList; michael@0: interface nsIDOMValidityState; michael@0: michael@0: /** michael@0: * The nsIDOMHTMLInputElement interface is the interface to a [X]HTML michael@0: * input element. michael@0: * michael@0: * This interface is trying to follow the DOM Level 2 HTML specification: michael@0: * http://www.w3.org/TR/DOM-Level-2-HTML/ michael@0: * michael@0: * with changes from the work-in-progress WHATWG HTML specification: michael@0: * http://www.whatwg.org/specs/web-apps/current-work/ michael@0: */ michael@0: michael@0: [scriptable, uuid(64aeda0b-e9b5-4868-a4f9-e4776e32e733)] michael@0: interface nsIDOMHTMLInputElement : nsISupports michael@0: { michael@0: attribute DOMString accept; michael@0: attribute DOMString alt; michael@0: michael@0: attribute DOMString autocomplete; michael@0: attribute boolean autofocus; michael@0: attribute boolean defaultChecked; michael@0: attribute boolean checked; michael@0: attribute boolean disabled; michael@0: readonly attribute nsIDOMHTMLFormElement form; michael@0: attribute DOMString formAction; michael@0: attribute DOMString formEnctype; michael@0: attribute DOMString formMethod; michael@0: attribute boolean formNoValidate; michael@0: attribute DOMString formTarget; michael@0: michael@0: readonly attribute nsIDOMFileList files; michael@0: michael@0: attribute unsigned long height; michael@0: attribute boolean indeterminate; michael@0: michael@0: attribute DOMString inputMode; michael@0: michael@0: readonly attribute nsIDOMHTMLElement list; michael@0: attribute DOMString max; michael@0: attribute long maxLength; michael@0: attribute DOMString min; michael@0: michael@0: attribute boolean multiple; michael@0: attribute DOMString name; michael@0: michael@0: attribute DOMString pattern; michael@0: attribute DOMString placeholder; michael@0: attribute boolean readOnly; michael@0: attribute boolean required; michael@0: attribute DOMString step; michael@0: michael@0: attribute DOMString align; michael@0: michael@0: attribute unsigned long size; michael@0: attribute unsigned long width; michael@0: attribute DOMString src; michael@0: michael@0: attribute DOMString type; michael@0: attribute DOMString defaultValue; michael@0: attribute DOMString value; michael@0: attribute double valueAsNumber; michael@0: // valustAsDate is only supported via WebIDL, because it's intimately michael@0: // tied to JS Date objects and xpidl support for that sort of thing is michael@0: // terrible. michael@0: michael@0: [optional_argc] void stepDown([optional] in long n); michael@0: [optional_argc] void stepUp([optional] in long n); michael@0: michael@0: // The following lines are part of the constraint validation API, see: michael@0: // http://www.whatwg.org/specs/web-apps/current-work/#the-constraint-validation-api michael@0: readonly attribute boolean willValidate; michael@0: readonly attribute nsIDOMValidityState validity; michael@0: readonly attribute DOMString validationMessage; michael@0: boolean checkValidity(); michael@0: void setCustomValidity(in DOMString error); michael@0: michael@0: void select(); michael@0: attribute long selectionStart; michael@0: attribute long selectionEnd; michael@0: void setSelectionRange(in long selectionStart, in long selectionEnd, [optional] in DOMString direction); michael@0: attribute DOMString selectionDirection; michael@0: michael@0: michael@0: attribute DOMString useMap; michael@0: readonly attribute nsIControllers controllers; michael@0: readonly attribute long textLength; michael@0: michael@0: void mozGetFileNameArray([optional] out unsigned long aLength, michael@0: [array,size_is(aLength), retval] out wstring aFileNames); michael@0: void mozSetFileNameArray([array,size_is(aLength)] in wstring aFileNames, michael@0: in unsigned long aLength); michael@0: michael@0: /** michael@0: * This non-standard method prevents to check types manually to know if the michael@0: * element is a text field. michael@0: */ michael@0: boolean mozIsTextField(in boolean aExcludePassword); michael@0: };