dom/interfaces/html/nsIDOMHTMLSelectElement.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial