| 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 | |
| 10 /** | 9 /** |
| 11 * Adds the class [value] to the element if it is not on it, removes it if it | 10 * Adds the class [value] to the element if it is not on it, removes it if it |
| 12 * is. | 11 * is. |
| 13 * | 12 * |
| 14 * If [shouldAdd] is true, then we always add that [value] to the element. If | 13 * If [shouldAdd] is true, then we always add that [value] to the element. If |
| 15 * [shouldAdd] is false then we always remove [value] from the element. | 14 * [shouldAdd] is false then we always remove [value] from the element. |
| 16 * | 15 * |
| 17 * If this corresponds to one element, returns `true` if [value] is present | 16 * If this corresponds to one element, returns `true` if [value] is present |
| 18 * after the operation, and returns `false` if [value] is absent after the | 17 * after the operation, and returns `false` if [value] is absent after the |
| 19 * operation. | 18 * operation. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 * [toggleClass](http://api.jquery.com/toggleClass/). | 102 * [toggleClass](http://api.jquery.com/toggleClass/). |
| 104 * If [shouldAdd] is true, then we always add all the classes in [iterable] | 103 * 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 | 104 * element. If [shouldAdd] is false then we always remove all the classes in |
| 106 * [iterable] from the element. | 105 * [iterable] from the element. |
| 107 * | 106 * |
| 108 * Each element of [iterable] must be a valid 'token' representing a single | 107 * Each element of [iterable] must be a valid 'token' representing a single |
| 109 * class, i.e. a non-empty string containing no whitespace. | 108 * class, i.e. a non-empty string containing no whitespace. |
| 110 */ | 109 */ |
| 111 void toggleAll(Iterable<String> iterable, [bool shouldAdd]); | 110 void toggleAll(Iterable<String> iterable, [bool shouldAdd]); |
| 112 } | 111 } |
| OLD | NEW |