************* bind XHR event listeners *************
190652
function(object, propertyA, propertyB) {
            if(typeof object[propertyA] !== 'undefined') {
                return object[propertyA];
            }
            if(typeof object[propertyB] !== 'undefined') {
                return object[propertyB];
            }
            return 0;
        }
1040860
function (e) {
      /* IE wrapper. */
      if (!e && window.event) { e = event; }
      var target = e.target || e.srcElement || undefined;

      /* We must not change page unless otherwise stated. */
      if (eventName === 'submit') {
        if (e.preventDefault) { e.preventDefault(); }
        else { e.returnValue = false; }
      }
      /*window.event.cancelBubble = true;
      if (e.stopPropagation) e.stopPropagation();*/

      /* User action before xhr send. */
      before.apply(target, [params, e, xhr]);

      sendxhr(target, params);
    }
525112
function(xhr, req) {
  var data = xhr.responseText || ''
    , status = +xhr.status
    , headers = {};

  if (status === 1223) status = 204;

  (xhr.getAllResponseHeaders() || '').replace(
    /(?:\r?\n|^)([^:\r\n]+): *([^\r\n]+)/g, 
    function($0, $1, $2) {
      headers[$1.toLowerCase()] = $2;
    }
  );

  this.rawBody = data;

  var type = headers['content-type'];
  if (type) {
    if (~type.indexOf('html')) {
      data = DOM(data);
    } else if (~type.indexOf('json')) {
      try {
        data = JSON.parse(data);
      } catch(e) {
        data = {};
        this._error = true;
      }
    } else if (~type.indexOf('javascript') && io.eval) {
      var script = document.createElement('script');
      DOM.setText(script, data);
      head.insertBefore(script, head.firstChild);
      data = null;
    }
  }

  this.url = req.url;
  this.statusCode = status;
  this.headers = headers;
  this.body = data;
}
657543
function globalEventHandler(event) {
    if (listeners[event.type]) {
      listeners[event.type].forEach(function(currentHandler) {
        currentHandler.call(this, event);
      }, this);
    }
  }
810113
function EventsBinder() {
    var listeners = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    classCallCheck(this, EventsBinder);

    this.listeners = listeners;
  }
1186301
function checkbox(bind, el, param, value) {
  var attr = {type: 'checkbox', name: param.signal};
  if (value) attr.checked = true;
  var node = element('input', attr);

  el.appendChild(node);

  node.addEventListener('change', function() {
    bind.update(node.checked);
  });

  bind.elements = [node];
  bind.set = function(value) { node.checked = !!value || null; }
}
346024
function() {
			var that = this,
				add = function(target, events, capture) {
					events.split(' ').forEach(function(type) {
						target.addEventListener(type, that, capture);
					});
				};
			add(document, 'DOMContentLoaded');
			add(document, 'click mousedown mouseup', true);
			add(window, 'load hashchange');
			if (!gui.hosted) {
				add(window, 'resize orientationchange');
			}
			if (!(window.chrome && chrome.app && chrome.runtime)) {
				add(window, 'unload');
			}
			
			/*
			if (document.readyState === "complete") { // TODO: IE cornercase?
				if (!this._loaded) {
					this._ondom();
					this._onload();
				}
			}
			*/
		}
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()
    }

  }

}
229304
protected function __bindEvents()
    {
        $server = $this->swoolePort ?? $this->swooleServer;

        $server->on('packet', function(\swoole_server $server, $data, $clientInfo){
            try{
                $this->trigger('packet', [
                    'server'        => $this,
                    'data'          => $data,
                    'clientInfo'    => $clientInfo,
                ], $this, PacketEventParam::class);
            }
            catch(\Throwable $ex)
            {
                App::getBean('ErrorLog')->onException($ex);
            }
        });
        
    }
695994
function (element, events, func) {
            for (var i = 0; i < events.length; i++) {
                element.addEventListener(events[i], func);
            }
        }
335376
function triggerListeners(listeners, event, args)
  {
    if (listeners && event in listeners)
    {
      var eventListeners = listeners[ event ];
      var triggerGroup = ++triggerId;
      var next, node = eventListeners.next;

      while (node !== eventListeners)
      {
        next = node.next;
        node.trigger( triggerGroup, args, false );
        node = next;
      }

      node = eventListeners.next;

      while (node !== eventListeners)
      {
        next = node.next;
        node.trigger( triggerGroup, args, true );
        node = next;
      }
    }
  }
1248607
function form(bind, el, param, value) {
  var node = element('input');

  for (var key in param) {
    if (key !== 'signal' && key !== 'element') {
      node.setAttribute(key === 'input' ? 'type' : key, param[key]);
    }
  }
  node.setAttribute('name', param.signal);
  node.value = value;

  el.appendChild(node);

  node.addEventListener('input', function() {
    bind.update(node.value);
  });

  bind.elements = [node];
  bind.set = function(value) { node.value = value; };
}
1085100
function handleClick(event) {
        var targetEl = browser.ie ? event.target.parentNode : event.target,
            $link = $(targetEl),
            data = $link.data('link');

        if (data) {
            scope.broadcast('linkclick', data);
        }
        event.preventDefault();
    }
1115664
function() {
			if (!this._attached) {

				forEachEventType(this._eventTypes, this._handler, function(eventType) {
					var that = this;

					function handleEvent() {
						that._handleEvent.apply(that, arguments);
					}

					Box.DOM.on(this.element, eventType, handleEvent);

					this._boundHandler[eventType] = handleEvent;
				}, this);

				this._attached = true;
			}
		}
46661
function bindEvent ( namespacedEvent, callback ) {
            scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];
            scope_Events[namespacedEvent].push(callback);

            // If the event bound is 'update,' fire it immediately for all handles.
            if ( namespacedEvent.split('.')[0] === 'update' ) {
                scope_Handles.forEach(function(a, index){
                    fireEvent('update', index);
                });
            }
        }
559362
function() { // add all the event listeners for every input and event type
				each(inp_change_events, function(event_type) {
					each(inps, function(inp) {
						aEL(inp, event_type, on_change);
					});
				});
			}
722319
function bindEventListeners(instanceData) {
		var eventDelegates = instanceData.eventDelegates,
			moduleBehaviors = getBehaviors(instanceData);

		// bind the module events
		createAndBindEventDelegate(eventDelegates, instanceData.element, instanceData.instance);

		// bind the behavior(s) events
		for (var i = 0; i < moduleBehaviors.length; i++) {
			createAndBindEventDelegate(eventDelegates, instanceData.element, moduleBehaviors[i]);
		}
	}