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

Side by Side Diff: tools/dom/src/CssClassSet.dart

Issue 68513006: o/~ Y muchos maaaaaaas... o/~ (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 18 matching lines...) Expand all
29 * [hasClass](http://api.jquery.com/hasClass/). 29 * [hasClass](http://api.jquery.com/hasClass/).
30 */ 30 */
31 bool contains(String value); 31 bool contains(String value);
32 32
33 /** 33 /**
34 * Add the class [value] to element. 34 * Add the class [value] to element.
35 * 35 *
36 * This is the Dart equivalent of jQuery's 36 * This is the Dart equivalent of jQuery's
37 * [addClass](http://api.jquery.com/addClass/). 37 * [addClass](http://api.jquery.com/addClass/).
38 * 38 *
39 * If this corresponds to one element. Returns `true` if [value] was added to 39 * If this corresponds to one element. Returns true if [value] was added to
40 * the set, otherwise `false`. 40 * the set, otherwise false.
41 * 41 *
42 * If this corresponds to many elements, `null` is always returned. 42 * If this corresponds to many elements, null is always returned.
43 */ 43 */
44 bool add(String value); 44 bool add(String value);
45 45
46 /** 46 /**
47 * Remove the class [value] from element, and return true on successful 47 * Remove the class [value] from element, and return true on successful
48 * removal. 48 * removal.
49 * 49 *
50 * This is the Dart equivalent of jQuery's 50 * This is the Dart equivalent of jQuery's
51 * [removeClass](http://api.jquery.com/removeClass/). 51 * [removeClass](http://api.jquery.com/removeClass/).
52 */ 52 */
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 } 158 }
159 return s; 159 return s;
160 } 160 }
161 161
162 void writeClasses(Set<String> s) { 162 void writeClasses(Set<String> s) {
163 List list = new List.from(s); 163 List list = new List.from(s);
164 _element.className = s.join(' '); 164 _element.className = s.join(' ');
165 } 165 }
166 } 166 }
OLDNEW
« no previous file with comments | « tools/dom/docs/lib/docs.dart ('k') | tools/dom/templates/html/impl/impl_ClientRect.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698