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 nsIDOMValidityState; michael@0: michael@0: /** michael@0: * The nsIDOMHTMLTextAreaElement interface is the interface to a michael@0: * [X]HTML textarea 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(7a4aeb2e-fcf3-443e-b002-ca1c8ea322e9)] michael@0: interface nsIDOMHTMLTextAreaElement : nsISupports michael@0: { michael@0: attribute boolean autofocus; michael@0: attribute unsigned long cols; michael@0: attribute boolean disabled; michael@0: readonly attribute nsIDOMHTMLFormElement form; michael@0: attribute long maxLength; michael@0: attribute DOMString name; michael@0: attribute DOMString placeholder; michael@0: attribute boolean readOnly; michael@0: attribute boolean required; michael@0: attribute unsigned long rows; michael@0: /** michael@0: * Reflects the wrap content attribute. Possible values are "soft", "hard" and michael@0: * "off". "soft" is the default. michael@0: */ michael@0: [Null(Stringify)] michael@0: attribute DOMString wrap; michael@0: michael@0: readonly attribute DOMString type; michael@0: attribute DOMString defaultValue; michael@0: attribute DOMString value; michael@0: readonly attribute long textLength; 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: // Mozilla extensions michael@0: // Please make sure to update the HTMLTextAreaElement Web IDL interface to michael@0: // mirror the list of Mozilla extensions here when changing it. michael@0: readonly attribute nsIControllers controllers; michael@0: };