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 file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origin of this IDL file is michael@0: * http://www.whatwg.org/specs/web-apps/current-work/#the-textarea-element michael@0: * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis michael@0: * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and michael@0: * Opera Software ASA. You are granted a license to use, reproduce michael@0: * and create derivative works of this document. michael@0: */ michael@0: michael@0: interface nsIEditor; michael@0: interface MozControllers; michael@0: michael@0: interface HTMLTextAreaElement : HTMLElement { michael@0: // attribute DOMString autocomplete; michael@0: [SetterThrows, Pure] michael@0: attribute boolean autofocus; michael@0: [SetterThrows, Pure] michael@0: attribute unsigned long cols; michael@0: // attribute DOMString dirName; michael@0: [SetterThrows, Pure] michael@0: attribute boolean disabled; michael@0: [Pure] michael@0: readonly attribute HTMLFormElement? form; michael@0: // attribute DOMString inputMode; michael@0: [SetterThrows, Pure] michael@0: attribute long maxLength; michael@0: [SetterThrows, Pure] michael@0: attribute DOMString name; michael@0: [SetterThrows, Pure] michael@0: attribute DOMString placeholder; michael@0: [SetterThrows, Pure] michael@0: attribute boolean readOnly; michael@0: [SetterThrows, Pure] michael@0: attribute boolean required; michael@0: [SetterThrows, Pure] michael@0: attribute unsigned long rows; michael@0: [SetterThrows, Pure] michael@0: attribute DOMString wrap; michael@0: michael@0: [Constant] michael@0: readonly attribute DOMString type; michael@0: [SetterThrows, Pure] michael@0: attribute DOMString defaultValue; michael@0: [TreatNullAs=EmptyString] attribute DOMString value; michael@0: readonly attribute unsigned long textLength; michael@0: michael@0: readonly attribute boolean willValidate; michael@0: readonly attribute ValidityState validity; michael@0: readonly attribute DOMString validationMessage; michael@0: boolean checkValidity(); michael@0: void setCustomValidity(DOMString error); michael@0: michael@0: // readonly attribute NodeList labels; michael@0: michael@0: void select(); michael@0: [Throws] michael@0: attribute unsigned long selectionStart; michael@0: [Throws] michael@0: attribute unsigned long selectionEnd; michael@0: [Throws] michael@0: attribute DOMString selectionDirection; michael@0: [Throws] michael@0: void setRangeText(DOMString replacement); michael@0: [Throws] michael@0: void setRangeText(DOMString replacement, unsigned long start, michael@0: unsigned long end, optional SelectionMode selectionMode = "preserve"); michael@0: [Throws] michael@0: void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); michael@0: }; michael@0: michael@0: partial interface HTMLTextAreaElement { michael@0: // Mirrored chrome-only Mozilla extensions to nsIDOMHTMLTextAreaElement. michael@0: // Please make sure to update this list of nsIDOMHTMLTextAreaElement changes. michael@0: michael@0: [Throws, ChromeOnly] michael@0: readonly attribute MozControllers controllers; michael@0: }; michael@0: michael@0: partial interface HTMLTextAreaElement { michael@0: // Mirrored chrome-only nsIDOMNSEditableElement methods. Please make sure michael@0: // to update this list if nsIDOMNSEditableElement changes. michael@0: michael@0: [ChromeOnly] michael@0: readonly attribute nsIEditor? editor; michael@0: michael@0: // This is similar to set .value on nsIDOMInput/TextAreaElements, but michael@0: // handling of the value change is closer to the normal user input, so michael@0: // 'change' event for example will be dispatched when focusing out the michael@0: // element. michael@0: [ChromeOnly] michael@0: void setUserInput(DOMString input); michael@0: };