Dispatch bubbling DOM event for potential handlers to intercept the update.
TODO: Investigate CustomEvent support in our browser stack...
@param {Element} element
@param {String} name
@return {boolean} False if event was canceled
344348
function(element, name) {
		var event = this.document.createEvent("UIEvents");
		event.initEvent(name, true, true);
		return element.dispatchEvent(event);
	}
713180
function setEventHandler(name, handler, dom, tag) {

  dom[name] = function(e) {

    var ptag = tag._parent,
      item = tag._item,
      el

    if (!item)
      while (ptag && !item) {
        item = ptag._item
        ptag = ptag._parent
      }

    // cross browser event fix
    e = e || window.event

    // override the event properties
    if (isWritable(e, 'currentTarget')) e.currentTarget = dom
    if (isWritable(e, 'target')) e.target = e.srcElement
    if (isWritable(e, 'which')) e.which = e.charCode || e.keyCode

    e.item = item

    // prevent default behaviour (by default)
    if (handler.call(tag, e) !== true && !/radio|check/.test(dom.type)) {
      if (e.preventDefault) e.preventDefault()
      e.returnValue = false
    }

    if (!e.preventUpdate) {
      el = item ? getImmediateCustomParentTag(ptag) : tag
      el.update()
    }

  }

}
1328235
function (view, eventName, event) {
      if (view.has(eventName)) {
        // Handler should be able to re-dispatch events, so we don't
        // preventDefault or stopPropagation.
        return _emberMetalInstrumentation.flaggedInstrument('interaction.' + eventName, { event: event, view: view }, function () {
          return _emberMetalRun_loop.default.join(view, view.trigger, eventName, event);
        });
      } else {
        return true; // continue event propagation
      }
    }
1260925
function elementOwnOnEl(name, listener, capture) {
    capture = !!capture;
    this._elFns.push([name, listener, capture]);
    on(this.el, name, listener, capture);
}
1133834
def has_callbacks(self, name):
        
        r = self.event_listeners.get(name)
        if not r:
            return False
        return len(r) > 0
210578
function(name) {
    for (var i = 0, len = this.asyncRules.length; i < len; i++) {
      if (this.asyncRules[i] === name) {
        return true;
      }
    }
    return false;
  }
958694
function(event, selector, handler, fn) {
      if (/^f/.test(typeof selector)) {
        handler = selector;
        fn = handler;
      }
      else if (/^s/.test(typeof selector)) {
        fn = handler;
        handler = function(e) {
          var element;
          if (u(e.target).is(selector)) {
            element = e.target;
          }
          else if (u(e.target).parents(selector).length) {
            element = u(e.target).parents(selector)[0];
          }
          if (element) {
            fn.apply(element, [e]);
          }
        };
      }
      return this.each(function(index, el) {
        var events = event.split(' ');
        u.each(events, function(i, event){
          u._events.add(el, event, fn, handler);
          el.addEventListener(event, function temp(e) {
            el.removeEventListener(event, temp);
            u._events.remove(el, event, fn);
            handler.call(this,e);
          });
        });
      });
    }
816243
function (name, prop) {
		this.unsetProperty(name);
		this.properties[name] = prop;
		this.listenTo(prop, EVENT_CHANGE, this.change);
		return prop;
	}
1062271
function(e, data, evt) {
      if (/^f/.test(typeof CustomEvent)) {
        evt = new CustomEvent(e, {
          detail: data,
          bubbles: true,
          cancelable: false
        });
      }
      else {
        evt = document.createEvent('CustomEvent');
        evt.initCustomEvent(e, true, false, data);
      }
      return this.each(function(index, el) {
        el.dispatchEvent ?
          el.dispatchEvent(evt) :
          el.fireEvent('on' + e, evt);
      });
    }
547388
function( domObject, eventName )
	{
		return function( domEvent )
		{
			// In FF, when reloading the page with the editor focused, it may
			// throw an error because the CKEDITOR global is not anymore
			// available. So, we check it here first. (#2923)
			if ( typeof CKEDITOR != 'undefined' )
				domObject.fire( eventName, new CKEDITOR.dom.event( domEvent ) );
		};
	}
359980
function( name, fn ) {
				var args = Array.prototype.slice.call( arguments, 0 );

				if ( CKEDITOR.env.ie && ( /^focus|blur$/ ).exec( name ) ) {
					name = name == 'focus' ? 'focusin' : 'focusout';

					// The "focusin/focusout" events bubbled, e.g. If there are elements with layout
					// they fire this event when clicking in to edit them but it must be ignored
					// to allow edit their contents. (#4682)
					fn = isNotBubbling( fn, this );
					args[ 0 ] = name;
					args[ 1 ] = fn;
				}

				return CKEDITOR.dom.element.prototype.on.apply( this, args );
			}
1086051
function (event) {
        var trigger = event.target;
        var probe = function (type) {
            if ((type !== event.type) || (1 !== trigger.nodeType)) {
                return false;
            }

            var attribute = ['data', this.id, type].join('-');
            var key = trigger.getAttribute(attribute);

            if (key && this.registry.hasOwnProperty(key)) {
                this.registry[key](event, trigger);
                return true;
            }

            if (-1 !== this.bubble.indexOf(type)) {
                while (this.documentElement !== trigger) {
                    trigger = trigger.parentNode;

                    if (probe(type)) {
                        break;
                    }
                }
            }

            return false;
        }.bind(this);

        this.events.forEach(probe);
    }
1030531
function fireEvent (element, type, data) {
  const evt = document.createEvent('Event')
  evt.data = data
  for (const k in data) {
    if (data.hasOwnProperty(k)) {
      evt[k] = data[k]
    }
  }
  // need bubble.
  evt.initEvent(type, true, true)

  element.dispatchEvent(evt)
}
438207
function( event, element, type, autoPrevent ) {

			// dispatchEvent doesn't always work in IE (mostly in a popup)
			if ( element.dispatchEvent && event ) {
				var preventDefault = event.preventDefault,
					prevents = autoPrevent ? -1 : 0;

				//automatically prevents the default behavior for this event
				//this is to protect agianst nasty browser freezing bug in safari
				if ( autoPrevent ) {
					bind(element, type, function( ev ) {
						ev.preventDefault();
						unbind(this, type, arguments.callee);
					});
				}


				event.preventDefault = function() {
					prevents++;
					if (++prevents > 0 ) {
						preventDefault.apply(this, []);
					}
				};
				element.dispatchEvent(event);
				return prevents <= 0;
			} else {
				try {
					window.event = event;
				} catch (e) {}
				//source element makes sure element is still in the document
				return element.sourceIndex <= 0 || (element.fireEvent && element.fireEvent('on' + type, event));
			}
		}
1327840
function(name) {
			var element = this.get(name);
			if (element) {
				this._updateSource('', element.fullRange());
				var ix = this._children.indexOf(element);
				if (~ix) {
					this._children.splice(ix, 1);
				}
			}
		}
436195
function(e) {
	      
	   Event.stopEvent(e);
	   
	   // Prevent removing a field if already at minItems
	   if( lang.isNumber(this.options.minItems) && this.subFields.length <= this.options.minItems ) {
	      return;
	   }
	      
	   // Get the wrapping div element
	   var elementDiv = Event.getTarget(e).parentNode;
	   
	   // Get the index of the subField
	   var index = -1;
	   
	   var subFieldEl = elementDiv.childNodes[this.options.useButtons ? 1 : 0];
	   for(var i = 0 ; i < this.subFields.length ; i++) {
	      if(this.subFields[i].getEl() == subFieldEl) {
	         index = i;
	         break;
	      }
	   }
	      
	   // Remove it
	   if(index != -1) {
	      this.removeElement(index);
	   }
		
		// Note: not very efficient
		this.resetAllNames();      
	
	   // Fire the updated event
	   this.fireUpdatedEvt();
	}
31705
function(name, callback) {
      this._events = this._events || {};
      var token = _.uniqueId('t');
      return this.subscribe(name, function() {
        this.unsubscribe(name, { token : token });
        callback.apply(this, arguments);
      }, this, token);
    }