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

Unified Diff: lib/dom/templates/html/impl/impl_Element.darttemplate

Issue 10222026: Migrate dom tests to dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase & address comments. Created 8 years, 8 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
Index: lib/dom/templates/html/impl/impl_Element.darttemplate
diff --git a/lib/dom/templates/html/impl/impl_Element.darttemplate b/lib/dom/templates/html/impl/impl_Element.darttemplate
index a53ab0001f1a62d4f164e55211632d6ae1be165c..d256f5c87605c2c101a8b95cbf66f4b01ee9d029 100644
--- a/lib/dom/templates/html/impl/impl_Element.darttemplate
+++ b/lib/dom/templates/html/impl/impl_Element.darttemplate
@@ -337,10 +337,13 @@ class _ElementAttributeMap implements AttributeMap {
if (!containsKey(key)) {
this[key] = ifAbsent();
}
+ return this[key];
}
String remove(String key) {
+ String value = _element.$dom_getAttribute(key);
_element.$dom_removeAttribute(key);
+ return value;
}
void clear() {
@@ -416,9 +419,8 @@ class _DataAttributeMap implements AttributeMap {
$dom_attributes[_attr(key)] = '$value';
}
- String putIfAbsent(String key, String ifAbsent()) {
+ String putIfAbsent(String key, String ifAbsent()) =>
$dom_attributes.putIfAbsent(_attr(key), ifAbsent);
- }
String remove(String key) => $dom_attributes.remove(_attr(key));

Powered by Google App Engine
This is Rietveld 408576698