feat: remove MapWrapper.create()/get()/set().

Better dart2js code, better Angular code.
This commit is contained in:
Martin Probst
2015-06-17 16:21:40 -07:00
parent 35e882e74f
commit be7ac9fd41
67 changed files with 388 additions and 418 deletions

View File

@ -168,11 +168,11 @@ export class BrowserDomAdapter extends GenericBrowserDomAdapter {
getStyle(element, stylename: string) { return element.style[stylename]; }
tagName(element): string { return element.tagName; }
attributeMap(element) {
var res = MapWrapper.create();
var res = new Map();
var elAttrs = element.attributes;
for (var i = 0; i < elAttrs.length; i++) {
var attrib = elAttrs[i];
MapWrapper.set(res, attrib.name, attrib.value);
res.set(attrib.name, attrib.value);
}
return res;
}

View File

@ -339,11 +339,11 @@ export class Parse5DomAdapter extends DomAdapter {
}
tagName(element): string { return element.tagName == "style" ? "STYLE" : element.tagName; }
attributeMap(element) {
var res = MapWrapper.create();
var res = new Map();
var elAttrs = treeAdapter.getAttrList(element);
for (var i = 0; i < elAttrs.length; i++) {
var attrib = elAttrs[i];
MapWrapper.set(res, attrib.name, attrib.value);
res.set(attrib.name, attrib.value);
}
return res;
}