Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1105)

Unified Diff: Source/core/html/HTMLOptionsCollection.idl

Issue 990613002: Sync the HTMLCollection interfaces with the specs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update order-dependent test expectations Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLFormControlsCollection.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLOptionsCollection.idl
diff --git a/Source/core/html/HTMLOptionsCollection.idl b/Source/core/html/HTMLOptionsCollection.idl
index f17973199830762a3172645fa4723f8f4b63a9b9..f5840306c3361f676c537436ab741caa766b2db0 100644
--- a/Source/core/html/HTMLOptionsCollection.idl
+++ b/Source/core/html/HTMLOptionsCollection.idl
@@ -19,19 +19,22 @@
* 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);
+ // FIXME: the index argument should be long, not unsigned long.
+ void remove(unsigned 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);
-
- [RaisesException, TypeChecking=Interface] void add((HTMLOptionElement or HTMLOptGroupElement) element,
- optional (HTMLElement or long)? before = null);
- void remove(unsigned long index);
};
« no previous file with comments | « Source/core/html/HTMLFormControlsCollection.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698