| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of html; | 5 part of html; |
| 6 | 6 |
| 7 /** A Set that stores the CSS class names for an element. */ | 7 /** A Set that stores the CSS class names for an element. */ |
| 8 abstract class CssClassSet implements Set<String> { | 8 abstract class CssClassSet implements Set<String> { |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 /** | 35 /** |
| 36 * Determine if this element contains the class [value]. | 36 * Determine if this element contains the class [value]. |
| 37 * | 37 * |
| 38 * This is the Dart equivalent of jQuery's | 38 * This is the Dart equivalent of jQuery's |
| 39 * [hasClass](http://api.jquery.com/hasClass/). | 39 * [hasClass](http://api.jquery.com/hasClass/). |
| 40 * | 40 * |
| 41 * [value] must be a valid 'token' representing a single class, i.e. a | 41 * [value] must be a valid 'token' representing a single class, i.e. a |
| 42 * non-empty string containing no whitespace. | 42 * non-empty string containing no whitespace. |
| 43 */ | 43 */ |
| 44 bool contains(String value); | 44 bool contains(Object value); |
| 45 | 45 |
| 46 /** | 46 /** |
| 47 * Add the class [value] to element. | 47 * Add the class [value] to element. |
| 48 * | 48 * |
| 49 * [add] and [addAll] are the Dart equivalent of jQuery's | 49 * [add] and [addAll] are the Dart equivalent of jQuery's |
| 50 * [addClass](http://api.jquery.com/addClass/). | 50 * [addClass](http://api.jquery.com/addClass/). |
| 51 * | 51 * |
| 52 * If this CssClassSet corresponds to one element. Returns true if [value] was | 52 * If this CssClassSet corresponds to one element. Returns true if [value] was |
| 53 * added to the set, otherwise false. | 53 * added to the set, otherwise false. |
| 54 * | 54 * |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 /** | 87 /** |
| 88 * Remove all classes specified in [iterable] from element. | 88 * Remove all classes specified in [iterable] from element. |
| 89 * | 89 * |
| 90 * [remove] and [removeAll] are the Dart equivalent of jQuery's | 90 * [remove] and [removeAll] are the Dart equivalent of jQuery's |
| 91 * [removeClass](http://api.jquery.com/removeClass/). | 91 * [removeClass](http://api.jquery.com/removeClass/). |
| 92 * | 92 * |
| 93 * Each element of [iterable] must be a valid 'token' representing a single | 93 * Each element of [iterable] must be a valid 'token' representing a single |
| 94 * class, i.e. a non-empty string containing no whitespace. | 94 * class, i.e. a non-empty string containing no whitespace. |
| 95 */ | 95 */ |
| 96 void removeAll(Iterable<String> iterable); | 96 void removeAll(Iterable<Object> iterable); |
| 97 | 97 |
| 98 /** | 98 /** |
| 99 * Toggles all classes specified in [iterable] on element. | 99 * Toggles all classes specified in [iterable] on element. |
| 100 * | 100 * |
| 101 * Iterate through [iterable]'s items, and add it if it is not on it, or | 101 * Iterate through [iterable]'s items, and add it if it is not on it, or |
| 102 * remove it if it is. This is the Dart equivalent of jQuery's | 102 * remove it if it is. This is the Dart equivalent of jQuery's |
| 103 * [toggleClass](http://api.jquery.com/toggleClass/). | 103 * [toggleClass](http://api.jquery.com/toggleClass/). |
| 104 * If [shouldAdd] is true, then we always add all the classes in [iterable] | 104 * If [shouldAdd] is true, then we always add all the classes in [iterable] |
| 105 * element. If [shouldAdd] is false then we always remove all the classes in | 105 * element. If [shouldAdd] is false then we always remove all the classes in |
| 106 * [iterable] from the element. | 106 * [iterable] from the element. |
| 107 * | 107 * |
| 108 * Each element of [iterable] must be a valid 'token' representing a single | 108 * Each element of [iterable] must be a valid 'token' representing a single |
| 109 * class, i.e. a non-empty string containing no whitespace. | 109 * class, i.e. a non-empty string containing no whitespace. |
| 110 */ | 110 */ |
| 111 void toggleAll(Iterable<String> iterable, [bool shouldAdd]); | 111 void toggleAll(Iterable<String> iterable, [bool shouldAdd]); |
| 112 } | 112 } |
| OLD | NEW |