dom/interfaces/html/nsIDOMHTMLOptionsCollection.idl

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     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 "nsIDOMHTMLCollection.idl"
     9 interface nsIDOMHTMLOptionElement;
    10 interface nsIDOMHTMLSelectElement;
    12 /**
    13  * The nsIDOMHTMLOptionsCollection interface is the interface to a
    14  * collection of [X]HTML option elements.
    15  *
    16  * This interface is trying to follow the DOM Level 2 HTML specification:
    17  * http://www.w3.org/TR/DOM-Level-2-HTML/
    18  *
    19  * with changes from the work-in-progress WHATWG HTML specification:
    20  * http://www.whatwg.org/specs/web-apps/current-work/
    21  */
    23 // Introduced in DOM Level 2:
    24 [scriptable, uuid(4173cc53-30f6-4d12-a770-981ba53164e2)]
    25 interface nsIDOMHTMLOptionsCollection : nsISupports
    26 {
    27            attribute unsigned long   length;
    28                                         // raises(DOMException) on setting
    30   // FIXME item should just be inherited from nsIDOMHTMLCollection
    31   nsIDOMNode         item(in unsigned long index);
    33   // FIXME namedItem (and getNamedItem) should return a NodeList if there are
    34   //       multiple matching items
    35   nsIDOMNode namedItem(in DOMString name);
    37            attribute long             selectedIndex;
    39   [noscript] void    setOption(in unsigned long index,
    40                                in nsIDOMHTMLOptionElement option);
    42   [noscript] readonly attribute nsIDOMHTMLSelectElement select;
    44   // This add method implementation means the following
    45   // since IDL doesn't support overloading.
    46   //   void add(in nsIDOMHTMLOptionElement,
    47   //            [optional] in nsIDOMHTMLOptionElement)
    48   //   void add(in nsIDOMHTMLOptionElement, in long)
    49   void                      add(in nsIDOMHTMLOptionElement option,
    50                                 [optional] in nsIVariant before);
    51   void                      remove(in long index);
    52 };

mercurial