nl_tokens: @ngdoc function @name ng . $rootScope . Scope#$emit @methodOf ng . $rootScope . Scope @function
pl_tokens: function ( name , args ) { var empty = [ ] , namedListeners , scope = this , stopPropagation = false , event = { name : name , targetScope : scope , stopPropagation : function ( ) { stopPropagation = true ; } , preventDefault : function ( ) { event . defaultPrevented = <mask> ; } , defaultPrevented : false } , listenerArgs = concat ( [ event ] , arguments , 1 ) , i , length ; do { namedListeners = scope . $$listeners [ name ] || empty ; event . currentScope = scope ; for ( i = 0 , length = namedListeners . length ; i < length ; i ++ ) { // if listeners were deregistered, defragment the array if ( ! namedListeners [ i ] ) { namedListeners . splice ( i , 1 ) ; i -- ; length -- ; continue ; } try { namedListeners [ i ] . apply ( null , listenerArgs ) ; if ( stopPropagation ) return event ; } catch ( e ) { $exceptionHandler ( e ) ; } } //traverse upwards scope = scope . $parent ; } while ( scope ) ; return event ; }