Add getChildDebugElementAll

This commit is contained in:
Roman Hotsiy 2015-12-19 15:31:09 +02:00
parent dda2b2bbe8
commit b2c1da25d1

View File

@ -10,6 +10,13 @@ export function getChildDebugElement(parent, tagName) {
});
}
/** Gets a child DebugElements by tag name. */
export function getChildDebugElementAll(parent, tagName) {
return parent.queryAll(debugEl => {
return debugEl.nativeElement.tagName && debugEl.nativeElement.tagName.toLowerCase() === tagName;
});
}
export function mouseclick( element ) {
// create a mouse click event
var event = document.createEvent( 'MouseEvents' );