refactor: return copy of DOM attributes in Dart

This alligns with JS-version behaviour
This commit is contained in:
Pawel Kozlowski 2015-03-12 15:52:40 +01:00
parent ce29862e2f
commit d35fdfcd40
1 changed files with 3 additions and 2 deletions

View File

@ -151,8 +151,9 @@ class BrowserDomAdapter extends GenericBrowserDomAdapter {
String tagName(Element element) => element.tagName; String tagName(Element element) => element.tagName;
Map<String, String> attributeMap(Element element) => Map<String, String> attributeMap(Element element) {
element.attributes; return new Map.from(element.attributes);
}
String getAttribute(Element element, String attribute) => String getAttribute(Element element, String attribute) =>
element.getAttribute(attribute); element.getAttribute(attribute);