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

Unified Diff: sdk/lib/html/html_common/css_class_set.dart

Issue 794953002: Fix a couple type bugs in dart html and what seems like strange type choices in dart:core (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | « sdk/lib/collection/set.dart ('k') | sdk/lib/html/html_common/filtered_element_list.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/html_common/css_class_set.dart
diff --git a/sdk/lib/html/html_common/css_class_set.dart b/sdk/lib/html/html_common/css_class_set.dart
index a81497e401f08207a316f332de3962bba0dc4049..4d7de3bcea9f07933c2fcf168f2d9868357bfe7c 100644
--- a/sdk/lib/html/html_common/css_class_set.dart
+++ b/sdk/lib/html/html_common/css_class_set.dart
@@ -81,10 +81,10 @@ abstract class CssClassSetImpl implements CssClassSet {
* This is the Dart equivalent of jQuery's
* [hasClass](http://api.jquery.com/hasClass/).
*/
- bool contains(String value) => readClasses().contains(value);
+ bool contains(Object value) => readClasses().contains(value);
/** Lookup from the Set interface. Not interesting for a String set. */
- String lookup(String value) => contains(value) ? value : null;
+ String lookup(Object value) => contains(value) ? value : null;
/**
* Add the class [value] to element.
@@ -184,9 +184,9 @@ abstract class CssClassSetImpl implements CssClassSet {
Iterable<String> skip(int n) => readClasses().skip(n);
Iterable<String> skipWhile(bool test(String value)) =>
readClasses().skipWhile(test);
- dynamic firstWhere(bool test(String value), { Object orElse() }) =>
+ String firstWhere(bool test(String value), { String orElse() }) =>
readClasses().firstWhere(test, orElse: orElse);
- dynamic lastWhere(bool test(String value), { Object orElse()}) =>
+ String lastWhere(bool test(String value), { String orElse()}) =>
readClasses().lastWhere(test, orElse: orElse);
String singleWhere(bool test(String value)) =>
readClasses().singleWhere(test);
« no previous file with comments | « sdk/lib/collection/set.dart ('k') | sdk/lib/html/html_common/filtered_element_list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698