feat: remove MapWrapper.contains().
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user