Chromium Code Reviews| 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)) { |
|
Anton Muhin
2012/04/26 18:47:36
technically you can use Maps.putIfAbsent here as y
|
| 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)); |