9a40e87326
BUG= TEST= Review URL: http://codereview.chromium.org//9168008 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3147 260f80e4-7a28-3924-810f-c04153c831b5
27 lines
832 B
Dart
27 lines
832 B
Dart
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
class CssWorld {
|
|
List<String> classes;
|
|
List<String> ids;
|
|
|
|
CssWorld(this.classes, this.ids) {
|
|
// Insure no private class names in our CSS world (._foo).
|
|
for (final aClass in classes) {
|
|
if (aClass.startsWith('_')) {
|
|
throw new CssSelectorException(
|
|
"private class ('_' prefix) not valid for CssWorld $aClass)");
|
|
}
|
|
}
|
|
|
|
// Insure no private element ids in our CSS world (#_foo).
|
|
for (final id in ids) {
|
|
if (id.startsWith('_')) {
|
|
throw new CssSelectorException(
|
|
"private id ('_' prefix) not valid for CssWorld $id)");
|
|
}
|
|
}
|
|
}
|
|
}
|