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

Unified Diff: tools/dom/src/AttributeMap.dart

Issue 12549025: Narrowing attribute maps to only accept strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « tests/html/instance_of_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/AttributeMap.dart
diff --git a/tools/dom/src/AttributeMap.dart b/tools/dom/src/AttributeMap.dart
index d309a71818aa499b937dea908e4c7224062e0d11..1d196e36d2d17e952176fa2cc2abadb6af0ef939 100644
--- a/tools/dom/src/AttributeMap.dart
+++ b/tools/dom/src/AttributeMap.dart
@@ -90,8 +90,8 @@ class _ElementAttributeMap extends _AttributeMap {
return _element.$dom_getAttribute(key);
}
- void operator []=(String key, value) {
- _element.$dom_setAttribute(key, '$value');
+ void operator []=(String key, String value) {
+ _element.$dom_setAttribute(key, value);
}
String remove(String key) {
@@ -127,8 +127,8 @@ class _NamespacedAttributeMap extends _AttributeMap {
return _element.$dom_getAttributeNS(_namespace, key);
}
- void operator []=(String key, value) {
- _element.$dom_setAttributeNS(_namespace, key, '$value');
+ void operator []=(String key, String value) {
+ _element.$dom_setAttributeNS(_namespace, key, value);
}
String remove(String key) {
@@ -167,8 +167,8 @@ class _DataAttributeMap implements Map<String, String> {
String operator [](String key) => $dom_attributes[_attr(key)];
- void operator []=(String key, value) {
- $dom_attributes[_attr(key)] = '$value';
+ void operator []=(String key, String value) {
+ $dom_attributes[_attr(key)] = value;
}
String putIfAbsent(String key, String ifAbsent()) =>
« no previous file with comments | « tests/html/instance_of_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698