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

Unified Diff: client/html/src/SVGElementWrappingImplementation.dart

Issue 9107047: Fix SVGElement#classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/html/src/CssClassSet.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/html/src/SVGElementWrappingImplementation.dart
diff --git a/client/html/src/SVGElementWrappingImplementation.dart b/client/html/src/SVGElementWrappingImplementation.dart
index 090a723ba5082d396a84c8994c7ee5da4510a0fd..41eb2c85f9acf2b46c1724dcf305253b5a92d509 100644
--- a/client/html/src/SVGElementWrappingImplementation.dart
+++ b/client/html/src/SVGElementWrappingImplementation.dart
@@ -2,6 +2,16 @@
// 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 _SVGClassSet extends _CssClassSet {
+ _SVGClassSet(element) : super(element);
+
+ String _className() => _element.className.baseVal;
+
+ viod _write(Set s) {
+ _element.className.baseVal = _formatSet(s);
+ }
+}
+
class SVGElementWrappingImplementation extends ElementWrappingImplementation implements SVGElement {
SVGElementWrappingImplementation._wrap(ptr) : super._wrap(ptr) {}
@@ -25,6 +35,13 @@ class SVGElementWrappingImplementation extends ElementWrappingImplementation imp
'top-level elements but 1 expected');
}
+ Set<String> get classes() {
+ if (_cssClassSet === null) {
+ _cssClassSet = new _SVGClassSet(_ptr);
+ }
+ return _cssClassSet;
+ }
+
String get id() { return _ptr.id; }
void set id(String value) { _ptr.id = value; }
« no previous file with comments | « client/html/src/CssClassSet.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698