1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/webidl/HTMLTextAreaElement.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,96 @@ 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 file, 1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + * 1.9 + * The origin of this IDL file is 1.10 + * http://www.whatwg.org/specs/web-apps/current-work/#the-textarea-element 1.11 + * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis 1.12 + * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and 1.13 + * Opera Software ASA. You are granted a license to use, reproduce 1.14 + * and create derivative works of this document. 1.15 + */ 1.16 + 1.17 +interface nsIEditor; 1.18 +interface MozControllers; 1.19 + 1.20 +interface HTMLTextAreaElement : HTMLElement { 1.21 + // attribute DOMString autocomplete; 1.22 + [SetterThrows, Pure] 1.23 + attribute boolean autofocus; 1.24 + [SetterThrows, Pure] 1.25 + attribute unsigned long cols; 1.26 + // attribute DOMString dirName; 1.27 + [SetterThrows, Pure] 1.28 + attribute boolean disabled; 1.29 + [Pure] 1.30 + readonly attribute HTMLFormElement? form; 1.31 + // attribute DOMString inputMode; 1.32 + [SetterThrows, Pure] 1.33 + attribute long maxLength; 1.34 + [SetterThrows, Pure] 1.35 + attribute DOMString name; 1.36 + [SetterThrows, Pure] 1.37 + attribute DOMString placeholder; 1.38 + [SetterThrows, Pure] 1.39 + attribute boolean readOnly; 1.40 + [SetterThrows, Pure] 1.41 + attribute boolean required; 1.42 + [SetterThrows, Pure] 1.43 + attribute unsigned long rows; 1.44 + [SetterThrows, Pure] 1.45 + attribute DOMString wrap; 1.46 + 1.47 + [Constant] 1.48 + readonly attribute DOMString type; 1.49 + [SetterThrows, Pure] 1.50 + attribute DOMString defaultValue; 1.51 + [TreatNullAs=EmptyString] attribute DOMString value; 1.52 + readonly attribute unsigned long textLength; 1.53 + 1.54 + readonly attribute boolean willValidate; 1.55 + readonly attribute ValidityState validity; 1.56 + readonly attribute DOMString validationMessage; 1.57 + boolean checkValidity(); 1.58 + void setCustomValidity(DOMString error); 1.59 + 1.60 + // readonly attribute NodeList labels; 1.61 + 1.62 + void select(); 1.63 + [Throws] 1.64 + attribute unsigned long selectionStart; 1.65 + [Throws] 1.66 + attribute unsigned long selectionEnd; 1.67 + [Throws] 1.68 + attribute DOMString selectionDirection; 1.69 + [Throws] 1.70 + void setRangeText(DOMString replacement); 1.71 + [Throws] 1.72 + void setRangeText(DOMString replacement, unsigned long start, 1.73 + unsigned long end, optional SelectionMode selectionMode = "preserve"); 1.74 + [Throws] 1.75 + void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); 1.76 +}; 1.77 + 1.78 +partial interface HTMLTextAreaElement { 1.79 + // Mirrored chrome-only Mozilla extensions to nsIDOMHTMLTextAreaElement. 1.80 + // Please make sure to update this list of nsIDOMHTMLTextAreaElement changes. 1.81 + 1.82 + [Throws, ChromeOnly] 1.83 + readonly attribute MozControllers controllers; 1.84 +}; 1.85 + 1.86 +partial interface HTMLTextAreaElement { 1.87 + // Mirrored chrome-only nsIDOMNSEditableElement methods. Please make sure 1.88 + // to update this list if nsIDOMNSEditableElement changes. 1.89 + 1.90 + [ChromeOnly] 1.91 + readonly attribute nsIEditor? editor; 1.92 + 1.93 + // This is similar to set .value on nsIDOMInput/TextAreaElements, but 1.94 + // handling of the value change is closer to the normal user input, so 1.95 + // 'change' event for example will be dispatched when focusing out the 1.96 + // element. 1.97 + [ChromeOnly] 1.98 + void setUserInput(DOMString input); 1.99 +};