Must be called regularly when using an external event loop.
188871
def iterate(self):
        
        if not self._inLoop:
            raise RuntimeError('run loop not started')
        elif self._driverLoop:
            raise RuntimeError('iterate not valid in driver run loop')
        self.proxy.iterate()
444536
function() {

		if (Lava.Core.isProcessingEvent()) {
			Lava.logError("ViewManager::refresh() must not be called inside event listeners");
			return;
		}

		if (this._is_refreshing) {
			Lava.logError("ViewManager: recursive call to refresh()");
			return;
		}

		Lava.ScopeManager.refresh();

		if (this._dirty_views.length) {

			this._is_refreshing = true;
			Lava.ScopeManager.lock();
			this._refresh_id++;

			do {
				var dirty_views = this._dirty_views,
					has_exceptions;
				this._dirty_views = [];
				has_exceptions = this._refreshCycle(dirty_views);
			} while (this._dirty_views.length && !has_exceptions);

			Lava.ScopeManager.unlock();
			this._is_refreshing = false;

		}

	}
858166
protected void trigger(GwtEvent<?> e, Function callback, Element element) {
    trigger(e, callback, element, eventBus);
  }
643114
function handleEvent(dom, handler, e) {
  var ptag = this.__.parent,
    item = this.__.item;

  if (!item)
    { while (ptag && !item) {
      item = ptag.__.item;
      ptag = ptag.__.parent;
    } }

  // override the event properties
  /* istanbul ignore next */
  if (isWritable(e, 'currentTarget')) { e.currentTarget = dom; }
  /* istanbul ignore next */
  if (isWritable(e, 'target')) { e.target = e.srcElement; }
  /* istanbul ignore next */
  if (isWritable(e, 'which')) { e.which = e.charCode || e.keyCode; }

  e.item = item;

  handler.call(this, e);

  // avoid auto updates
  if (!settings$1.autoUpdate) { return }

  if (!e.preventUpdate) {
    var p = getImmediateCustomParentTag(this);
    // fixes #2083
    if (p.isMounted) { p.update(); }
  }
}
1314329
function(options){
    EventEmitter.call(this);

    // Data Structures
    // Persistence
    this.data = {};
    this.triggers = {};
    this.queue = [];
    this.nextTick = false;

    // Dynamic
    this.needs = {};
    this.events = {};
    this.options = options || {};
}
1178471
function (event) {
            // flag that avoids to trigger the user callback when browsing the checkbox list
            var avoidCallback = (this._hasFocus || this._keepFocus);
            this.$TextInput._dom_onfocus.call(this, event, true);
            if (this._cfg.onfocus && !avoidCallback) {
                this.evalCallback(this._cfg.onfocus);
            }
        }
1264956
def run_console(*, locals=None, banner=None, serve=None, prompt_control=None):
    """"""
    loop = InteractiveEventLoop(
        locals=locals,
        banner=banner,
        serve=serve,
        prompt_control=prompt_control)
    asyncio.set_event_loop(loop)
    try:
        loop.run_forever()
    except KeyboardInterrupt:
        pass
324131
public void invokeCallbacks(String eventName, T eventData) {
        String name = eventName;
        
        while (!StringUtils.isEmpty(name)) {
            Iterable<IGenericEvent<T>> subscribers = getSubscribers(name);
            
            if (subscribers != null) {
                for (IGenericEvent<T> subscriber : subscribers) {
                    try {
                        if (log.isDebugEnabled()) {
                            log.debug(String.format("Firing local Event[name=%s,data=%s]", eventName, eventData));
                        }
                        subscriber.eventCallback(eventName, eventData);
                    } catch (Throwable e) {
                        log.error("Error during local event callback.", e);
                    }
                }
            }
            
            name = stripLevel(name);
        }
    }
553235
protected function ensureEvents()
	{
		if ($this->_events === null) {
			$this->_events = [];
			if (method_exists($this, 'events')) {
			    if ($events = $this->events()) foreach ($events as $name => $handler) {
					$this->on($name, $handler);
				}
			}
		}
	}
863988
function () {
                    if (this._notificationsSent && !this._externalBegin && !this._endNotificationsPosted) {
                        this._endNotificationsPosted = true;
                        var that = this;
                        Scheduler.schedule(function ItemsManager_async_endNotifications() {
                            that._endNotificationsPosted = false;
                            that._endNotifications();
                        }, Scheduler.Priority.high, null, "WinJS.UI._ItemsManager._postEndNotifications");
                    }
                }
764933
function (event, module) {
            this.data.overTemplates = module.outerTemplateCtxts;
            this.mouseOver(event);
            this._refreshTemplatesDisplay();
            // prevent propagation
            event.stopPropagation();
        }
758223
function EventEmitter(isAsync) {
        if (isAsync === void 0) { isAsync = false; }
        var _this = _super.call(this) || this;
        _this.__isAsync = isAsync;
        return _this;
    }
3569
function() {

                if (onAvailStack.length === 0) {
                    retryCount = 0;
                    if (this._interval) {
                        // clearInterval(this._interval);
                        this._interval.cancel();
                        this._interval = null;
                    } 
                    return;
                }

                if (this.locked) {
                    return;
                }

                if (this.isIE) {
                    // Hold off if DOMReady has not fired and check current
                    // readyState to protect against the IE operation aborted
                    // issue.
                    if (!this.DOMReady) {
                        this.startInterval();
                        return;
                    }
                }

                this.locked = true;


                // keep trying until after the page is loaded.  We need to 
                // check the page load state prior to trying to bind the 
                // elements so that we can be certain all elements have been 
                // tested appropriately
                var tryAgain = !loadComplete;
                if (!tryAgain) {
                    tryAgain = (retryCount > 0 && onAvailStack.length > 0);
                }

                // onAvailable
                var notAvail = [];

                var executeItem = function (el, item) {
                    var context = el;
                    if (item.overrideContext) {
                        if (item.overrideContext === true) {
                            context = item.obj;
                        } else {
                            context = item.overrideContext;
                        }
                    }
                    item.fn.call(context, item.obj);
                };

                var i, len, item, el, ready=[];

                // onAvailable onContentReady
                for (i=0, len=onAvailStack.length; i<len; i=i+1) {
                    item = onAvailStack[i];
                    if (item) {
                        el = this.getEl(item.id);
                        if (el) {
                            if (item.checkReady) {
                                if (loadComplete || el.nextSibling || !tryAgain) {
                                    ready.push(item);
                                    onAvailStack[i] = null;
                                }
                            } else {
                                executeItem(el, item);
                                onAvailStack[i] = null;
                            }
                        } else {
                            notAvail.push(item);
                        }
                    }
                }
                
                // make sure onContentReady fires after onAvailable
                for (i=0, len=ready.length; i<len; i=i+1) {
                    item = ready[i];
                    executeItem(this.getEl(item.id), item);
                }


                retryCount--;

                if (tryAgain) {
                    for (i=onAvailStack.length-1; i>-1; i--) {
                        item = onAvailStack[i];
                        if (!item || !item.id) {
                            onAvailStack.splice(i, 1);
                        }
                    }

                    this.startInterval();
                } else {
                    if (this._interval) {
                        // clearInterval(this._interval);
                        this._interval.cancel();
                        this._interval = null;
                    }
                }

                this.locked = false;

            }
655007
function(callback, opt_this) {
      this.iterateAllEventContainers(function(ec) {
        ec.iterateAllEventsInThisContainer(
            function(eventType) { return true; },
            callback, opt_this);
      });
    }
774721
function(){
      var value = this.get();
      var cursor = this;

      while (cursor = cursor.handler)
        cursor.fn.call(cursor.context, value);
    }
673406
def trigger(self, event, *args):
        """"""
        for handler in self._event_handlers[event]:
            handler(*args)
813872
void fireEvent() {
        boolean useLock = !isReentrant();
        if (useLock) {
            lock.lock();
        }
        EventImpl event = eventQueue.poll();

        try {
            if (event != null) {
                fireEvent(event);
            }
        } finally {
            if (useLock) {
                lock.unlock();
            }
        }

    }