summaryrefslogtreecommitdiffstats
path: root/dom/interfaces/xul/nsIDOMXULContainerElement.idl
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/interfaces/xul/nsIDOMXULContainerElement.idl
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/interfaces/xul/nsIDOMXULContainerElement.idl')
-rw-r--r--dom/interfaces/xul/nsIDOMXULContainerElement.idl68
1 files changed, 68 insertions, 0 deletions
diff --git a/dom/interfaces/xul/nsIDOMXULContainerElement.idl b/dom/interfaces/xul/nsIDOMXULContainerElement.idl
new file mode 100644
index 000000000..a60e6967e
--- /dev/null
+++ b/dom/interfaces/xul/nsIDOMXULContainerElement.idl
@@ -0,0 +1,68 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nsIDOMXULElement.idl"
+interface nsIDOMXULContainerElement;
+
+[scriptable, uuid(800a68c7-b854-4597-a436-3055ce5c5c96)]
+interface nsIDOMXULContainerItemElement : nsISupports
+{
+ /**
+ * Returns the parent container if any.
+ */
+ readonly attribute nsIDOMXULContainerElement parentContainer;
+};
+
+[scriptable, uuid(b2bc96b8-31fc-42f4-937a-bd27291af40b)]
+interface nsIDOMXULContainerElement : nsIDOMXULContainerItemElement
+{
+ /**
+ * Creates an item for the given label and value and appends it to the
+ * container.
+ *
+ * @param aLabel - the label for the new item
+ * @param aValue - the value of the new item
+ */
+ nsIDOMXULElement appendItem(in DOMString aLabel, in DOMString aValue);
+
+ /**
+ * Creates an item for the given label and value and inserts it into the
+ * container at the specified position.
+ *
+ * @param aIndex - the index where the new item will be inserted
+ * @param aLabel - the label for the new item
+ * @param aValue - the value of the new item
+ */
+ nsIDOMXULElement insertItemAt(in long aIndex, in DOMString aLabel,
+ in DOMString aValue);
+
+ /**
+ * Removes an item from the container.
+ *
+ * @param aIndex - index of the item to remove
+ */
+ nsIDOMXULElement removeItemAt(in long aIndex);
+
+ /**
+ * Returns a count of items in the container.
+ */
+ readonly attribute unsigned long itemCount;
+
+ /**
+ * Returns the index of an item or -1 if the item is not in the container.
+ *
+ * @param aItem - the item to determine the index of
+ */
+ long getIndexOfItem(in nsIDOMXULElement aItem);
+
+ /**
+ * Returns the item at a given index or null if the item is not is the
+ * container.
+ *
+ * @param aIndex - the index of the item to return
+ */
+ nsIDOMXULElement getItemAtIndex(in long aIndex);
+};
+