Skip to content

Commit d35fdfc

Browse files
refactor: return copy of DOM attributes in Dart
This alligns with JS-version behaviour
1 parent ce29862 commit d35fdfc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/angular2/src/dom/browser_adapter.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
151151

152152
String tagName(Element element) => element.tagName;
153153

154-
Map<String, String> attributeMap(Element element) =>
155-
element.attributes;
154+
Map<String, String> attributeMap(Element element) {
155+
return new Map.from(element.attributes);
156+
}
156157

157158
String getAttribute(Element element, String attribute) =>
158159
element.getAttribute(attribute);

0 commit comments

Comments
 (0)