mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-06-12 08:04:39 +08:00
perf(Scope): exit $broadcast early if nobody is listening for the given event
This commit is contained in:
@@ -1148,8 +1148,11 @@ function $RootScopeProvider(){
|
||||
event.defaultPrevented = true;
|
||||
},
|
||||
defaultPrevented: false
|
||||
},
|
||||
listenerArgs = concat([event], arguments, 1),
|
||||
};
|
||||
|
||||
if (!target.$$listenerCount[name]) return event;
|
||||
|
||||
var listenerArgs = concat([event], arguments, 1),
|
||||
listeners, i, length;
|
||||
|
||||
//down while you can, then up and next sibling or up and next sibling until back at root
|
||||
|
||||
Reference in New Issue
Block a user