Fires an event with the given name and data.
@param {string} type The type of event to fire.
@param {Object} [data] An object with properties that should end up on
the event object for the given event.
@returns {void}
423842
function(type, data) {

			var handlers,
				i,
				len,
				event = {
					type: type,
					data: data
				};

			// if there are handlers for the event, call them in order
			handlers = this._handlers[event.type];
			if (handlers instanceof Array) {
				// @NOTE: do a concat() here to create a copy of the handlers array,
				// so that if another handler is removed of the same type, it doesn't
				// interfere with the handlers array during this loop
				handlers = handlers.concat();
				for (i = 0, len = handlers.length; i < len; i++) {
					handlers[i].call(this, event);
				}
			}
		}
978185
function Event (type, optionalProperties) {
  Object.defineProperty(this, 'type', { writable: false, value: type, enumerable: true })
  if (optionalProperties) {
    for (var f in optionalProperties) {
      if (optionalProperties.hasOwnProperty(f)) {
        Object.defineProperty(this, f, { writable: false, value: optionalProperties[f], enumerable: true })
      }
    }
  }
}
318803
function (types) {

    that.logger.logEnter('callback in loadEventTypes, types:\n' + JSON.stringify(types));

    // The "raw" event type data has a deeply-nested structure and it
    // contains a bunch of stuff we're not interested in.  We'll just
    // store the names of each type's properties.
    Object.keys(types).forEach(function (typeName) {
      if (types[typeName].properties) {
        eventTypes[typeName] = Object.keys(types[typeName].properties);
      }
    });

    that.logger.log('eventTypes:\n' + JSON.stringify(eventTypes));

    if (process.env.TESTONLY_EMIT_INTERNAL_EVENTS) {
      that.emit(that.CONSTANT.internal_event_load_types_done);
    }

    // Now the event buffer can begin processing events.
    eventBuffer.ready();

    that.logger.logExit('callback in loadEventTypes');
  }
1301148
private void fireEvent(int eventType, Object eventObject) {
        AgentRosterListener[] listeners;
        synchronized (this.listeners) {
            listeners = new AgentRosterListener[this.listeners.size()];
            this.listeners.toArray(listeners);
        }
        for (int i = 0; i < listeners.length; i++) {
            switch (eventType) {
                case EVENT_AGENT_ADDED:
                    listeners[i].agentAdded((EntityBareJid) eventObject);
                    break;
                case EVENT_AGENT_REMOVED:
                    listeners[i].agentRemoved((EntityBareJid) eventObject);
                    break;
                case EVENT_PRESENCE_CHANGED:
                    listeners[i].presenceChanged((Presence) eventObject);
                    break;
            }
        }
    }
330658
public function onFrame($data, $type)
    {
        foreach (explode("\n", $data) as $pct) {
            if ($pct === '') {
                continue;
            }
            $this->onPacket(json_decode($pct, true));
        }
    }
123717
function(target, type, properties) {
			if(_.type(target) === 'string' || _.type(target) === 'array') {
				var elements = _.type(target) === 'string'? $$(target) : target;
				
				elements.forEach(function(element) {
					_.event.fire(element, type, properties);
				});
			}
			else if (document.createEvent) {
				var evt = document.createEvent("HTMLEvents");
		
				evt.initEvent(type, true, true );
				evt.custom = true;
		
				if(properties) {
					_.attach(evt, properties);
				}
		
				target.dispatchEvent(evt);
			}
		}
1193920
def set_trigger_event(type, new_val)
      raise JSS::InvalidDataError, "Trigger type must be one of #{TRIGGER_EVENTS.keys.join(', ')}" unless TRIGGER_EVENTS.key?(type)
      if type == :custom
        raise JSS::InvalidDataError, 'Custom triggers must be Strings' unless new_val.is_a? String
      else
        raise JSS::InvalidDataError, 'Non-custom triggers must be true or false' unless JSS::TRUE_FALSE.include? new_val
      end
      @trigger_events[TRIGGER_EVENTS[type]] = new_val
      @need_to_update = true
    end
456654
protected function _execute($type, $data)
    {
        if (!isset($this->_handles[$type]))
        {
            $this->_tmp_handles = array();
            $path = \Swoole::$app_path.'/events/'.$type.'.php';
            if (is_file($path))
            {
                $_conf = include $path;
                if ($_conf and isset($_conf['handlers']) and is_array($_conf['handlers']))
                {
                    foreach ($_conf['handlers'] as $h)
                    {
                        if (class_exists($h))
                        {
                            $object = new $h;
                            if ($object instanceof IFace\EventHandler)
                            {
                                $this->_tmp_handles[] = $object;
                                continue;
                            }
                        }
                        trigger_error("invalid event handler[$type|$h]", E_USER_WARNING);
                    }
                }
            }
            $this->_handles[$type] = $this->_tmp_handles;
        }

        foreach($this->_handles[$type] as $handler)
        {
            /**
             * @var  $handler  IFace\EventHandler
             */
            $handler->trigger($type, $data);
        }
        return true;
    }
597775
function fireEvent(element, name, data) {
    if (data === void 0) { data = {}; }
    var event = new CustomEvent(name, {
        detail: data,
        bubbles: true
    });
    element.dispatchEvent(event);
    return event;
}
790579
function(type, args) {
        Base.prototype.fireEvent.call(this, type, args);

        var element = this.element,
            node = this.node,
            event = $.Event(type + '.toolkit.' + this.keyName);
            event.context = this;

        // Trigger event on the element and the node
        if (element) {
            element.trigger(event, args || []);
        }

        if (node) {
            node.trigger(event, args || []);
        }
    }
48066
function(type, data) {
			if (gui.Type.isString(type)) {
				return this._dispatch({
					type: type,
					data: data,
					global: true,
					$contextid: gui.$contextid
				});
			} else {
				console.error('The "target" argument (the first argument) of gui.Broadcast.dispatchGlobal is deprecated');
				return this.dispatchGlobal(arguments[1], arguments[2]);
			}
		}
595760
function fire(event, data) {
  var channel = require('cordova/channel');
  var cordova = require('cordova');
  var payload = {};

  channel.onCordovaReady.subscribe(function() {
    var prop = (event === 'error') ? event : 'data';
    payload[prop] = data;
    cordova.fireDocumentEvent(event, payload);
  });
}
964412
def fire_event(self, name, exc=None, data=None):
        
        if self._events and name in self._events:
            self._events[name].fire(exc=exc, data=data)
1255159
function _runCallback(eventName, data) {
      for (var id in _mappings[eventName].callbacks) {
        var callbackObject = _mappings[eventName].callbacks[id];

        if (typeof callbackObject.cb === 'function') callbackObject.cb(data);
        if (typeof callbackObject.once === 'boolean' && callbackObject.once === true) _self.off(eventName, callbackObject.cb);
      }
    }
679899
private void fireFrameType(final CEMI frame, final int type)
	{
		final FrameEvent e = new FrameEvent(this, frame);
		final Consumer<? super TransportListener> c;
		if (type == 0)
			c = l -> l.broadcast(e);
		else if (type == 1)
			c = l -> l.group(e);
		else if (type == 2)
			c = l -> l.dataIndividual(e);
		else if (type == 3)
			c = l -> l.dataConnected(e);
		else
			return;
		listeners.fire(c);
	}
350768
public void fireEvent(Type eventType, Object event, Annotation... qualifiers) {
        final EventMetadata metadata = new EventMetadataImpl(eventType, null, qualifiers);
        notifier.fireEvent(eventType, event, metadata, qualifiers);
    }
684251
function fireEvent(element, type, extra) {
  var event = doc.createEvent('HTMLEvents')
  event.initEvent(type, true, true)

  if (typeof extra === 'object') {
    for (var p in extra) {
      event[p] = extra[p]
    }
  }

  /**
   * A flag to distinguish with other events with the same name generated
   * by another library in the same page.
   */ 
  event._for = 'weex'

  element.dispatchEvent(event)
}