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_common; | 5 part of "dart:html_common"; |
6 | 6 |
7 abstract class CssClassSetImpl implements CssClassSet { | 7 abstract class CssClassSetImpl implements CssClassSet { |
8 static final RegExp _validTokenRE = new RegExp(r'^\S+$'); | 8 static final RegExp _validTokenRE = new RegExp(r'^\S+$'); |
9 | 9 |
10 String _validateToken(String value) { | 10 String _validateToken(String value) { |
11 if (_validTokenRE.hasMatch(value)) return value; | 11 if (_validTokenRE.hasMatch(value)) return value; |
12 throw new ArgumentError.value(value, 'value', 'Not a valid class token'); | 12 throw new ArgumentError.value(value, 'value', 'Not a valid class token'); |
13 } | 13 } |
14 | 14 |
15 String toString() { | 15 String toString() { |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 */ | 233 */ |
234 Set<String> readClasses(); | 234 Set<String> readClasses(); |
235 | 235 |
236 /** | 236 /** |
237 * Join all the elements of a set into one string and write | 237 * Join all the elements of a set into one string and write |
238 * back to the element. | 238 * back to the element. |
239 * This is intended to be overridden by specific implementations. | 239 * This is intended to be overridden by specific implementations. |
240 */ | 240 */ |
241 void writeClasses(Set<String> s); | 241 void writeClasses(Set<String> s); |
242 } | 242 } |
OLD | NEW |