refactor(compiler): minor cleanup

This commit is contained in:
Tobias Bosch
2016-11-03 11:16:28 -07:00
committed by vikerman
parent 648ce5981b
commit e3687706c7
11 changed files with 34 additions and 22 deletions

View File

@ -128,6 +128,8 @@ export class ServerRenderer implements Renderer {
destroyView(hostElement: any, viewAllNodes: any[]) {}
listen(renderElement: any, name: string, callback: Function): Function {
// Note: We are not using the EventsPlugin here as this is not needed
// to run our tests.
var outsideHandler = (event: any) => this._zone.runGuarded(() => callback(event));
return this._zone.runOutsideAngular(
() => getDOM().onAndCancel(renderElement, name, outsideHandler));