From d35fdfcd4046f64333eb7ec3a8c72bf11923b565 Mon Sep 17 00:00:00 2001 From: Pawel Kozlowski Date: Thu, 12 Mar 2015 15:52:40 +0100 Subject: [PATCH] refactor: return copy of DOM attributes in Dart This alligns with JS-version behaviour --- modules/angular2/src/dom/browser_adapter.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/angular2/src/dom/browser_adapter.dart b/modules/angular2/src/dom/browser_adapter.dart index bad37ab8ce..37bf545962 100644 --- a/modules/angular2/src/dom/browser_adapter.dart +++ b/modules/angular2/src/dom/browser_adapter.dart @@ -151,8 +151,9 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter { String tagName(Element element) => element.tagName; - Map attributeMap(Element element) => - element.attributes; + Map attributeMap(Element element) { + return new Map.from(element.attributes); + } String getAttribute(Element element, String attribute) => element.getAttribute(attribute);