Index: core/html/HTMLOptionsCollection.idl |
diff --git a/core/html/HTMLOptionsCollection.idl b/core/html/HTMLOptionsCollection.idl |
index 01f3e25672de7e8b746f82f33d993534ec50ba70..7a9fabfd63e862a952043cbff9b4d090f8c8741f 100644 |
--- a/core/html/HTMLOptionsCollection.idl |
+++ b/core/html/HTMLOptionsCollection.idl |
@@ -19,18 +19,21 @@ |
* Boston, MA 02110-1301, USA. |
*/ |
+// https://html.spec.whatwg.org/#the-htmloptionscollection-interface |
+ |
[ |
DependentLifetime, |
SetWrapperReferenceFrom=ownerNode, |
] interface HTMLOptionsCollection : HTMLCollection { |
+ // inherits item() |
+ [Custom=Setter, RaisesException=Setter] attribute unsigned long length; // shadows inherited length |
+ // FIXME: The spec has a legacycaller HTMLOptionElement? (DOMString name); |
+ [RaisesException, TypeChecking=Interface] setter void (unsigned long index, HTMLOptionElement? option); |
+ [RaisesException, TypeChecking=Interface] void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); |
+ void remove(long index); |
attribute long selectedIndex; |
- [Custom=Setter, RaisesException=Setter] attribute unsigned long length; |
+ // FIXME: Neither of these getters are in the spec, and the |
+ // getters inherited from HTMLCollection always return an Element. |
[ImplementedAs=item] getter Node (unsigned long index); |
- [RaisesException, TypeChecking=Interface] setter HTMLOptionElement (unsigned long index, HTMLOptionElement? value); |
- |
- // FIXME: The spec and firefox return an Element (the first matching Element). |
- [ImplementedAs=namedGetter] getter (NodeList or Element) namedItem(DOMString name); |
- |
- [Custom, RaisesException, DartSuppress] void add([Default=Undefined] optional HTMLOptionElement option, optional unsigned long index); |
- void remove(unsigned long index); |
+ [ImplementedAs=namedGetter] getter (NodeList or Element)? namedItem(DOMString name); |
}; |