Register event handlers for attributes.

@param {Object} component
@param {String} eventNames
336303
function(component, eventNames) {
          eventNames = eventNames.trim().split(/\s+/);

          for (var i = 0, l = eventNames.length; i < l; i++) {
            var eventName = eventNames[i];
            this._registerEventHandler(component, eventName);
          }
        }
810113
function EventsBinder() {
    var listeners = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    classCallCheck(this, EventsBinder);

    this.listeners = listeners;
  }
1006658
function addComponentNodeListener (node, eventName, handler) {
  /* istanbul ignore next */
  if (!node.componentOptions.listeners) {
    node.componentOptions.listeners = {};
  }

  mergeVNodeListeners(node.componentOptions.listeners, eventName, handler);
}
238581
public static function update_handlers_for_component($componentname) {
        global $DB;

        $componentname = \core_component::normalize_componentname($componentname);
        $existinghandlers = $DB->get_recordset('messageinbound_handlers', array('component' => $componentname));
        foreach ($existinghandlers as $handler) {
            if (!class_exists($handler->classname)) {
                self::remove_messageinbound_handler($handler);
            }
        }
        $existinghandlers->close();

        self::create_missing_messageinbound_handlers_for_component($componentname);
    }
91836
function wrapComponent(component, elementName) {
  let bindableProps = [];
  if (component.propTypes) {
    bindableProps = Object.keys(component.propTypes).map(prop => bindable({
      name: prop,
      attribute: camelToKebab(prop),
      changeHandler: 'updateProps',
      defaultBindingMode: 1
    }));
  }
  return decorators(
    noView(),
    customElement(elementName),
    bindable({name: 'props', attribute: 'props', changeHandler: 'updateProps', defaultBindingMode: 1}),
    ...bindableProps
  ).on(createWrapperClass(component));
}
941395
function trigger(eventsInput, args)
  {
    try
    {
      var events = toArray( eventsInput, ' ' );

      for (var i = 0; i < events.length; i++)
      {
        triggerListeners( this.$$on, events[ i ], args );
      }
    }
    catch (ex)
    {
      Rekord.trigger( Rekord.Events.Error, [ex] );
    }

    return this;
  }
182320
function ReactRegister(module, events) {
        "use strict";
    
        // jsx register functions that creates the React elements
        // this is done this way because React.createElement cannot be called until
        // React is loaded by requirejs
        var registeredFunctions = {};
    
        var React, ReactDOM;
    
        var items = {};
        Object.defineProperty(this, 'items', {
            'get': function () {
                return items;
            }
        });
    
        var ready;
        var loading;
        Object.defineProperty(this, 'loading', {
            'get': function () {
                return loading;
            }
        });
    
        var loadDependencies = function () {
    
            require(['react', 'react-dom'], function (_React, _ReactDOM) {
    
                React = _React;
                ReactDOM = _ReactDOM;
    
                module.React = React;
                module.ReactDOM = ReactDOM;
    
                for (var key in registeredFunctions) {
                    items[key] = registeredFunctions[key]();
                }
    
                loading = false;
                ready = true;
    
                for (var i in callbacks) {
                    callbacks[i]();
                }
                callbacks = [];
    
                events.trigger('react:ready');
    
            });
    
        };
    
        var checkDependencies = function () {
    
            if (ready || loading) {
                return;
            }
    
            loading = true;
    
            // the timeout is to avoid MISMATCHED ANONYMOUS DEFINE (requirejs)
            setTimeout(loadDependencies, 0);
    
        };
    
        this.register = function (key, createElementFnc) {
    
            checkDependencies();
    
            if (!ready) {
                registeredFunctions[key] = createElementFnc;
                return;
            }
    
            items[key] = createElementFnc();
    
        };
    
        var callbacks = [];
        this.done = function (callback) {
    
            if (ready) {
                callback();
                return;
            }
    
            callbacks.push(callback);
    
        };
    
        this.createControl = function (specs) {
            "use strict";
    
            if (!React) {
                console.error('Wait for React to be ready');
                return;
            }
    
            if (!specs || typeof specs.render !== 'function') {
                console.warn('Invalid control specification');
            }
    
            return React.createClass({
    
                'getInitialState': function () {
    
                    if (typeof this.props.sna !== 'object') {
                        console.warn('sna is invalid or not set');
                        return null;
                    }
    
                    this.sna = this.props.sna;
                    this.extended = this.props.extended;
    
                    if (typeof this.sna.actions !== 'object') {
                        console.warn('sna actions are invalid or not defined');
                    }
                    else {
                        this.actions = this.sna.actions;
                    }
    
                    if (typeof this.sna.state !== 'object') {
                        console.warn('sna state is invalid or not defined');
                        return null;
                    }
    
                    return this.sna.state;
    
                },
                '_onChange': function () {
    
                    if (typeof this.sna.state !== 'object') {
                        console.warn('sna state is invalid or not defined');
                        return null;
                    }
    
                    if (typeof this.sna.actions !== 'object') {
                        console.warn('sna actions are invalid or not defined');
                    }
                    else {
                        this.actions = this.sna.actions;
                    }
    
                    this.setState(this.sna.state);
    
                },
                'componentDidMount': function () {
    
                    if (!this.sna || !this.sna.bind) return;
                    this.sna.bind('change', this._onChange);
    
                    if (!specs || !specs.componentDidMount) return null;
                    return specs.componentDidMount.call(this, specs);
    
                },
                'componentWillUnmount': function () {
    
                    if (!this.sna || !this.sna.unbind) return;
                    this.sna.unbind('change', this._onChange);
    
                    if (!specs || !specs.componentWillUnmount) return null;
                    return specs.componentWillUnmount.call(this, specs);
    
                },
                'componentWillUpdate': function () {
    
                    if (!specs || !specs.componentWillUpdate) return null;
                    return specs.componentWillUpdate.call(this, specs);
    
                },
                'componentDidUpdate': function () {
    
                    if (!specs || !specs.componentDidUpdate) return null;
                    return specs.componentDidUpdate.call(this, specs);
    
                },
                'render': function () {
    
                    if (!specs || !specs.render) return null;
    
                    specs.extended = this.props.extended;
                    return specs.render.call(specs, this.state, this.actions, this);
    
                }
    
            });
    
        }
    
    }
1374017
function addHandlers(node, handlers, thisObject){
    node = getNode(node);

    for (var eventType in handlers)
      addHandler(node, eventType, handlers[eventType], thisObject);
  }
16662
function(eventTags) {
    if (typeof eventTags === 'object' && !Array.isArray(eventTags) && eventTags !== null) {
      return true;
    } else {
      throw new Error(sprintf(ERROR_MESSAGES.INVALID_EVENT_TAGS, MODULE_NAME));
    }
  }
179115
function(evname) {
    var fns = this._events && this._events[evname] || [],
    args = __slice.call(arguments, 1);
    for (var i = 0, ii = fns.length; i < ii; i++) {
      fns[i].cb.apply(fns[i].ctxt, args);
    }
  }
996612
protected void registerListenerAttributes() {
        addAttributeProcessor(new ConditionLmlAttribute(), "if");
        addAttributeProcessor(new KeepListenerLmlAttribute(), "keep");
        addAttributeProcessor(new ListenerIdsLmlAttribute(), "ids");
        // InputListener:
        addAttributeProcessor(new CombinedKeysLmlAttribute(), "combined");
        addAttributeProcessor(new ListenerKeysLmlAttribute(), "keys");
    }
360704
function(object, events) {
        if (!object.__isInterfaceImplemented('events')) {
            object.__implementInterface('events', this.interface);
        }

        object.__initEvents();

        _.each(events, function(eventListeners, eventName) {
            _.each(eventListeners, function(listener, listenerName) {
                object.__addEventListener(eventName, listenerName, listener);
            });
        });
    }
615321
function(el, eventName, data)
    {
        var ev;

        if (document.createEvent) {
            ev = document.createEvent('HTMLEvents');
            ev.initEvent(eventName, true, false);
            ev = extend(ev, data);
            el.dispatchEvent(ev);
        } else if (document.createEventObject) {
            ev = document.createEventObject();
            ev = extend(ev, data);
            el.fireEvent('on' + eventName, ev);
        }
    }
345918
function(event_name, event_args) {

		if (Lava.schema.DEBUG && typeof(event_name) == "undefined") Lava.t();

		if (this._listeners[event_name] != null) {

			this._callListeners(this._listeners[event_name], event_args);

		}

	}
79983
function (eventName, data) {
      if (document.createEvent) {
        var evt = document.createEvent('HTMLEvents');
        evt.initEvent(eventName, true, false);
        evt = this.extend(evt, data);
        return this.each(function (v) {
          return v.dispatchEvent(evt);
        });
      }
    }
1000200
function(eventName, handler) {
    if (!this.__eventListeners) {
      this.__eventListeners = { };
    }
    if (this.__eventListeners[eventName]) {
      fabric.util.removeFromArray(this.__eventListeners[eventName], handler);
    }
  }
463803
function(eventName, fn) {
    apos.handlers[eventName] = (apos.handlers[eventName] || []).concat([ fn ]);
  }