Handler for attaching events trough a proxy.
760581
function attachEvent ( events, element, callback, data ) {

            // This function can be used to 'filter' events to the slider.
            // element is a node, not a nodeList

            var method = function ( e ){

                if ( scope_Target.hasAttribute('disabled') ) {
                    return false;
                }

                // Stop if an active 'tap' transition is taking place.
                if ( hasClass(scope_Target, options.cssClasses.tap) ) {
                    return false;
                }

                e = fixEvent(e, data.pageOffset);

                // Handle reject of multitouch
                if ( !e ) {
                    return false;
                }

                // Ignore right or middle clicks on start #454
                if ( events === actions.start && e.buttons !== undefined && e.buttons > 1 ) {
                    return false;
                }

                // Ignore right or middle clicks on start #454
                if ( data.hover && e.buttons ) {
                    return false;
                }

                e.calcPoint = e.points[ options.ort ];

                // Call the event handler with the event [ and additional data ].
                callback ( e, data );
            };

            var methods = [];

            // Bind a closure on the target for every event type.
            events.split(' ').forEach(function( eventName ){
                element.addEventListener(eventName, method, false);
                methods.push([eventName, method]);
            });

            return methods;
        }
284670
protected final void invokeDraw(View view, Canvas canvas) {
        final ViewProxy proxy = (ViewProxy) view;
        proxy.invokeDraw(canvas);
    }
586476
public void bindTo(Object proxy) {
    if (handle != null) {
      throw new IllegalStateException(
          "Attempted to rebind a default method handler that was already bound");
    }
    handle = unboundHandle.bindTo(proxy);
  }
84792
def bind event, *xargs, &blk
        #$log.debug "#{self} called EventHandler BIND #{event}, args:#{xargs} "
        if @_events
          $log.warn "bind: #{self.class} does not support this event: #{event}. #{@_events} " if !event? event
          #raise ArgumentError, "#{self.class} does not support this event: #{event}. #{@_events} " if !event? event
        else
          # it can come here if bind in initial block, since widgets add to @_event after calling super
          # maybe we can change that.
          $log.warn "BIND #{self.class} (#{event})  XXXXX no events defined in @_events. Please do so to avoid bugs and debugging. This will become a fatal error soon."
        end
        @handler ||= {}
        @event_args ||= {}
        @handler[event] ||= []
        @handler[event] << blk
        @event_args[event] ||= []
        @event_args[event] << xargs
      end
981695
function registerEventHandlers(windowBridge, app)
{
  "use strict";
  handleOutgoingEvent(windowBridge, app, WebAPIEvents.EVENT_WEBAPI_REQUEST_DESKPRO, WebAPIEvents.props.EVENT_WEBAPI_REQUEST_DESKPRO);
  handleOutgoingEvent(windowBridge, app, WebAPIEvents.EVENT_WEBAPI_REQUEST_FETCH, WebAPIEvents.props.EVENT_WEBAPI_REQUEST_FETCH);
}
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);
            }
        });
        
    }
283440
protected function attachEvents(): void
	{
		foreach ($this->router as $route) {
			if ($route instanceof ApiRoute) {
				$route->onMatch[] = [$this, 'routeMatched'];
			}
		}
	}
608337
function fire (event, $el, evt) {
    var handler = $el.data('dragon-opts')[event];
    // Patch the proxied Event Object
    evt.target = $el[0];
    if (handler) {
      handler(evt);
    }

    $el.trigger(event);
  }
722863
function eventProxy(e) {
    return this._listeners[e.type]((options.event && options.event(e)) || e);
  }
1266107
def _update_proxy(self, change):
        
        if change['type'] == 'event':
            name = 'do_'+change['name']
            if hasattr(self.proxy, name):
                handler = getattr(self.proxy, name)
                handler()
        else:
            super(WebView, self)._update_proxy(change)
982614
def _dispatcher(self, connection, event):
        
        super(BaseBot, self)._dispatcher(connection, event)
        for handler in self.events[event.eventtype()]:
            handler(self, connection, event)
515007
def _update_proxy(self, change):
        
        if change['type'] in ['event', 'update'] and self.proxy_is_active:
            handler = getattr(self.proxy, 'set_' + change['name'], None)
            if handler is not None:
                handler(change['value'])
576686
def trigger_event(self, event, client, args, force_dispatch=False):
        """"""
        self.controller.process_event(event, client, args, force_dispatch=force_dispatch)
120793
def _trigger_event(self, event, namespace, *args):
        """"""
        # first see if we have an explicit handler for the event
        if namespace in self.handlers and event in self.handlers[namespace]:
            return self.handlers[namespace][event](*args)

        # or else, forward the event to a namespace handler if one exists
        elif namespace in self.namespace_handlers:
            return self.namespace_handlers[namespace].trigger_event(
                event, *args)
753665
function attachEvent(obj, type, func, scope)
    {
        function handler(e)
        {
            e = e || window.event;

            if (!e.target)
            {
                e.target = e.srcElement;
                e.preventDefault = function()
                {
                    this.returnValue = false;
                };
            }

            func.call(scope || window, e);
        };

        if (obj.attachEvent)
        {
            obj.attachEvent('on' + type, handler);
        }
        else
        {
            obj.addEventListener(type, handler, false);
        }
    }
460924
private void attachEvents(Action a, JSONObject in) throws JSONConverterException {
        if (in.containsKey(HOOK_LABEL)) {
            JSONObject hooks = (JSONObject) in.get(HOOK_LABEL);
            for (Map.Entry<String, Object> e : hooks.entrySet()) {
                String k = e.getKey();
                try {
                    Action.Hook h = Action.Hook.valueOf(k.toUpperCase());
                    for (Object o : (JSONArray) e.getValue()) {
                        a.addEvent(h, eventFromJSON((JSONObject) o));
                    }
                } catch (IllegalArgumentException ex) {
                    throw new JSONConverterException("Unsupported hook type '" + k + "'", ex);
                }
            }
        }
    }
718789
private void executeHandlers(List<Event> filteredEvents) {
        for (EventHandler current : eventHandlers) {
            for (Event event : filteredEvents) {
                current.handleEvent(event);
            }
        }
    }