feat: remove MapWrapper.contains().

This commit is contained in:
Martin Probst
2015-06-17 21:42:56 -07:00
parent be7ac9fd41
commit dfd30910aa
18 changed files with 28 additions and 30 deletions

View File

@ -198,7 +198,7 @@ class MockStep implements CompileStep {
export class IgnoreChildrenStep implements CompileStep {
process(parent: CompileElement, current: CompileElement, control: CompileControl) {
var attributeMap = DOM.attributeMap(current.element);
if (MapWrapper.contains(attributeMap, 'ignore-children')) {
if (attributeMap.has('ignore-children')) {
current.compileChildren = false;
}
}
@ -207,7 +207,7 @@ export class IgnoreChildrenStep implements CompileStep {
class IgnoreCurrentElementStep implements CompileStep {
process(parent: CompileElement, current: CompileElement, control: CompileControl) {
var attributeMap = DOM.attributeMap(current.element);
if (MapWrapper.contains(attributeMap, 'ignore-current')) {
if (attributeMap.has('ignore-current')) {
control.ignoreCurrentElement();
}
}

View File

@ -52,9 +52,9 @@ export function main() {
var manager = new EventManager([plugin1, plugin2], new FakeNgZone());
manager.addEventListener(element, 'click', clickHandler);
manager.addEventListener(element, 'dblclick', dblClickHandler);
expect(MapWrapper.contains(plugin1._nonBubbleEventHandlers, 'click')).toBe(false);
expect(plugin1._nonBubbleEventHandlers.has('click')).toBe(false);
expect(plugin2._nonBubbleEventHandlers.get('click')).toBe(clickHandler);
expect(MapWrapper.contains(plugin2._nonBubbleEventHandlers, 'dblclick')).toBe(false);
expect(plugin2._nonBubbleEventHandlers.has('dblclick')).toBe(false);
expect(plugin1._nonBubbleEventHandlers.get('dblclick')).toBe(dblClickHandler);
});