64784aa1b1
Change for in memory buffers. BUG= TEST= Review URL: http://codereview.chromium.org//8498020 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1752 260f80e4-7a28-3924-810f-c04153c831b5
27 lines
820 B
Dart
27 lines
820 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 (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 (id in ids) {
|
|
if (id.startsWith('_')) {
|
|
throw new CssSelectorException(
|
|
"private id ('_' prefix) not valid for CssWorld $id)");
|
|
}
|
|
}
|
|
}
|
|
}
|