code: function(name, args) {
          var target = this,
              current = target,
              next = target,
              event = {
                name: name,
                targetScope: target,
                preventDefault: function() {
                  event.defaultPrevented = true;
                },
                defaultPrevented: false
              },
              listenerArgs = concat([event], arguments, 1);
  
          //down while you can, then up and next sibling or up and next sibling until back at root
          do {
            current = next;
            event.currentScope = current;
            forEach(current.$$listeners[name], function(listener) {
              try {
                listener.apply(null, listenerArgs);
              } catch(e) {
                $exceptionHandler(e);
              }
            });
  
            // Insanity Warning: scope depth-first traversal
            // yes, this code is a bit crazy, but it works and we have tests to prove it!
            // this piece should be kept in sync with the traversal in $digest
            if (!(next = (current.$$childHead || (current !== target && current.$$nextSibling)))) {
              while(current !== target && !(next = current.$$nextSibling)) {
                current = current.$parent;
              }
            }
          } while ((current = next));
  
          return event;
        }
docs: @ngdoc function
  @name ng.$rootScope.Scope#$broadcast
  @methodOf ng.$rootScope.Scope
  @function
  
  @description
  Dispatches an event `name` downwards to all child scopes (and their children) notifying the
  registered {@link ng.$rootScope.Scope#$on} listeners.
  
  The event life cycle starts at the scope on which `$broadcast` was called. All
  {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get notified.
  Afterwards, the event propagates to all direct and indirect scopes of the current scope and
  calls all registered listeners along the way. The event cannot be canceled.
  
  Any exception emmited from the {@link ng.$rootScope.Scope#$on listeners} will be passed
  onto the {@link ng.$exceptionHandler $exceptionHandler} service.
  
  @param {string} name Event name to emit.
  @param {...*} args Optional set of arguments which will be passed onto the event listeners.
  @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}