Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsIDOMHTMLElement.idl" |
michael@0 | 7 | #include "nsIDOMHTMLOptionsCollection.idl" |
michael@0 | 8 | |
michael@0 | 9 | /** |
michael@0 | 10 | * The nsIDOMHTMLSelectElement interface is the interface to a [X]HTML |
michael@0 | 11 | * select element. |
michael@0 | 12 | * |
michael@0 | 13 | * This interface is trying to follow the DOM Level 2 HTML specification: |
michael@0 | 14 | * http://www.w3.org/TR/DOM-Level-2-HTML/ |
michael@0 | 15 | * |
michael@0 | 16 | * with changes from the work-in-progress WHATWG HTML specification: |
michael@0 | 17 | * http://www.whatwg.org/specs/web-apps/current-work/ |
michael@0 | 18 | */ |
michael@0 | 19 | |
michael@0 | 20 | interface nsIDOMValidityState; |
michael@0 | 21 | |
michael@0 | 22 | [scriptable, uuid(d8914a2d-3556-4b66-911c-a84c4394e7fa)] |
michael@0 | 23 | interface nsIDOMHTMLSelectElement : nsISupports |
michael@0 | 24 | { |
michael@0 | 25 | attribute boolean autofocus; |
michael@0 | 26 | attribute boolean disabled; |
michael@0 | 27 | readonly attribute nsIDOMHTMLFormElement form; |
michael@0 | 28 | attribute boolean multiple; |
michael@0 | 29 | attribute DOMString name; |
michael@0 | 30 | attribute unsigned long size; |
michael@0 | 31 | |
michael@0 | 32 | readonly attribute DOMString type; |
michael@0 | 33 | |
michael@0 | 34 | readonly attribute nsIDOMHTMLOptionsCollection options; |
michael@0 | 35 | attribute unsigned long length; |
michael@0 | 36 | nsIDOMNode item(in unsigned long index); |
michael@0 | 37 | nsIDOMNode namedItem(in DOMString name); |
michael@0 | 38 | // This add method implementation means the following |
michael@0 | 39 | // since IDL doesn't support overfload. |
michael@0 | 40 | // void add(in nsIDOMHTMLElement, [optional] in nsIDOMHTMLElement) |
michael@0 | 41 | // void add(in nsIDOMHTMLElement, in long) |
michael@0 | 42 | void add(in nsIDOMHTMLElement element, |
michael@0 | 43 | [optional] in nsIVariant before) |
michael@0 | 44 | raises(DOMException); |
michael@0 | 45 | void remove(in long index); |
michael@0 | 46 | |
michael@0 | 47 | readonly attribute nsIDOMHTMLCollection selectedOptions; |
michael@0 | 48 | attribute long selectedIndex; |
michael@0 | 49 | attribute DOMString value; |
michael@0 | 50 | |
michael@0 | 51 | // The following lines are part of the constraint validation API, see: |
michael@0 | 52 | // http://www.whatwg.org/specs/web-apps/current-work/#the-constraint-validation-api |
michael@0 | 53 | readonly attribute boolean willValidate; |
michael@0 | 54 | readonly attribute nsIDOMValidityState validity; |
michael@0 | 55 | readonly attribute DOMString validationMessage; |
michael@0 | 56 | boolean checkValidity(); |
michael@0 | 57 | void setCustomValidity(in DOMString error); |
michael@0 | 58 | |
michael@0 | 59 | attribute boolean required; |
michael@0 | 60 | }; |