Chromium Code Reviews| 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; |
|
vsm
2014/12/11 01:16:22
I'm surprised this and the above are typed to take
Jacob
2014/12/11 17:32:23
Plausible justification for the design: no need to
|
| /** |
| * 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() }) => |
|
vsm
2014/12/11 01:16:22
orElse is typed Object in the docs:
https://api
kevmoo
2014/12/11 01:23:55
Be careful! Known issue in docs generator.
The so
Jacob
2014/12/11 17:32:23
The docs are misleading for this case as kevin sai
|
| readClasses().firstWhere(test, orElse: orElse); |
| - dynamic lastWhere(bool test(String value), { Object orElse()}) => |
| + String lastWhere(bool test(String value), { String orElse()}) => |
|
vsm
2014/12/11 01:16:22
ditto
kevmoo
2014/12/11 01:23:55
see above
|
| readClasses().lastWhere(test, orElse: orElse); |
| String singleWhere(bool test(String value)) => |
| readClasses().singleWhere(test); |