EventPacket
@constructor
973195
function EventPacket(items) {
  Packet.call(this);
  this.items = items || [];
  this.json = JSON.stringify(this.items);
}
949783
function init(properties) {
            this.eventListeners = [];

            if (typeof properties !== 'undefined') {
                Object.keys(properties).forEach(function (property) {
                    this[property] = properties[property];
                }, this);
            }

            return this;
        }
1130936
function (eventName, args)
  {
    var e = this._events[eventName];
    if (e) {
      args = args || [];
      e.forEach (function (handler)
      {
        handler.apply (this, args);
      });
    }
  }
733407
function EventEmitter() {
    var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

    _classCallCheck(this, EventEmitter);

    this._events = {};
    if (opts.async) this.emit = emitAsync;
  }
893622
function eventHandler(e) {
      if (e.page.path === loader.getPage(pathname).path) {
        emitter.off(`onPostLoadPageResources`, eventHandler)
        clearTimeout(timeoutId)
        window.___history.push(pathname)
      }
    }
389079
function () {
                var msg = [], tp;
                msg.push('## ' + this.$classpath + ' ## ');
                for (var k in this) {
                    if (this.hasOwnProperty(k)) {
                        tp = typeof(this[k]);
                        if (tp == 'object' || tp == 'function')
                            msg.push(k += ':[' + tp + ']');
                        else if (tp == 'string')
                            msg.push(k += ':"' + this[k] + '"');
                        else
                            msg.push(k += ':' + this[k]);
                    }
                }
                Aria.$window.alert(msg.join('\n'));
                msg = null;
            }
265218
function(input) {
		var evt;

		if (typeof Event === 'function') {
			evt = new Event('input', {
				bubbles: true
			});
		} else {
			evt = dcmnt.createEvent('Event');
			evt.initEvent('input', true, false);
		}

		input.dispatchEvent(evt);
	}
175782
function onListeners($this, eventsInput, callback, context, type)
  {
    if ( !isFunction( callback ) )
    {
      return noop;
    }

    var callbackContext = context || $this;
    var events = toArray( eventsInput, ' ' );
    var listeners = $this.$$on;

    if ( !listeners )
    {
      Class.prop( $this, '$$on', listeners = {} );
    }

    var nodes = [];

    for (var i = 0; i < events.length; i++)
    {
      var eventName = events[ i ];
      var eventListeners = listeners[ eventName ];

      if ( !eventListeners )
      {
        eventListeners = listeners[ eventName ] = new EventNode();
      }

      nodes.push( new EventNode( eventListeners, callback, callbackContext, type, triggerId ) );
    }

    return function ignore()
    {
      for (var i = 0; i < nodes.length; i++)
      {
        nodes[ i ].remove();
      }

      nodes.length = 0;
    };
  }
727507
function wrap() {
  var ports = this.compiledModule.ports;

  var incomingEmitter = new EventEmitter();
  var outgoingEmitter = new EventEmitter();

  var emit = incomingEmitter.emit.bind(incomingEmitter);

  Object.keys(ports).forEach(function(key) {
    outgoingEmitter.addListener(key, function() {
      var args = Array.prototype.slice.call(arguments)

      ports[key].send.apply(ports[key], args);
    });

    if (ports[key].subscribe) {
      ports[key].subscribe(function() {
        var args = Array.prototype.slice.call(arguments);
        args.unshift(key);

        emit.apply(incomingEmitter, args);
      });
    }
  });

  incomingEmitter.emit = outgoingEmitter.emit.bind(outgoingEmitter);;

  this.emitter = incomingEmitter;
  this.ports = this.compiledModule.ports;
}
30726
function(init)
        {
          var $this = this,
            r,
            g,
            b,
            a,
            h,
            s,
            v,
            changeEvents = new Array(),
            fireChangeEvents = 
              function(context)
              {
                for (var i = 0; i < changeEvents.length; i++) changeEvents[i].call($this, $this, context);
              },
            val =
              function(name, value, context)
              {
                // Kind of ugly
                var set = Boolean(value);
                if (set && value.ahex === "") value.ahex = "00000000";
                if (!set)
                {
                  if (name === undefined || name == null || name == '') name = 'all';
                  if (r == null) return null;
                  switch (name.toLowerCase())
                  {
                    case 'ahex': return ColorMethods.rgbaToHex({ r: r, g: g, b: b, a: a });
                    case 'hex': return val('ahex').substring(0, 6);
                    case 'all': return { r: r, g: g, b: b, a: a, h: h, s: s, v: v, hex: val.call($this, 'hex'), ahex: val.call($this, 'ahex') };
                    default:
                      var ret={};
                      for (var i = 0; i < name.length; i++)
                      {
                        switch (name.charAt(i))
                        {
                          case 'r':
                            if (name.length == 1) ret = r;
                            else ret.r = r;
                            break;
                          case 'g':
                            if (name.length == 1) ret = g;
                            else ret.g = g;
                            break;
                          case 'b':
                            if (name.length == 1) ret = b;
                            else ret.b = b;
                            break;
                          case 'a':
                            if (name.length == 1) ret = a;
                            else ret.a = a;
                            break;
                          case 'h':
                            if (name.length == 1) ret = h;
                            else ret.h = h;
                            break;
                          case 's':
                            if (name.length == 1) ret = s;
                            else ret.s = s;
                            break;
                          case 'v':
                            if (name.length == 1) ret = v;
                            else ret.v = v;
                            break;
                        }
                      }
                      return ret == {} ? val.call($this, 'all') : ret;
                      break;
                  }
                }
                if (context != null && context == $this) return;
                var changed = false;
                if (name == null) name = '';
                if (value == null)
                {
                  if (r != null)
                  {
                    r = null;
                    changed = true;
                  }
                  if (g != null)
                  {
                    g = null;
                    changed = true;
                  }
                  if (b != null)
                  {
                    b = null;
                    changed = true;
                  }
                  if (a != null)
                  {
                    a = null;
                    changed = true;
                  }
                  if (h != null)
                  {
                    h = null;
                    changed = true;
                  }
                  if (s != null)
                  {
                    s = null;
                    changed = true;
                  }
                  if (v != null)
                  {
                    v = null;
                    changed = true;
                  }
                  changed && fireChangeEvents.call($this, context || $this);
                  return;
                }
                switch (name.toLowerCase())
                {
                  case 'ahex':
                  case 'hex':
                    var ret = ColorMethods.hexToRgba(value && (value.ahex || value.hex) || value || 'none');

                    val.call($this, 'rgba', { r: ret.r, g: ret.g, b: ret.b, a: name == 'ahex' ? ret.a : a != null ? a : 255 }, context);
                    break;
                  default:
                    if (value && (value.ahex != null || value.hex != null))
                    {
                      val.call($this, 'ahex', value.ahex || value.hex || '00000000', context);
                      return;
                    }
                    var newV = {}, rgb = false, hsv = false;
                    if (value.r !== undefined && !name.indexOf('r') == -1) name += 'r';
                    if (value.g !== undefined && !name.indexOf('g') == -1) name += 'g';
                    if (value.b !== undefined && !name.indexOf('b') == -1) name += 'b';
                    if (value.a !== undefined && !name.indexOf('a') == -1) name += 'a';
                    if (value.h !== undefined && !name.indexOf('h') == -1) name += 'h';
                    if (value.s !== undefined && !name.indexOf('s') == -1) name += 's';
                    if (value.v !== undefined && !name.indexOf('v') == -1) name += 'v';
                    for (var i = 0; i < name.length; i++)
                    {
                      switch (name.charAt(i))
                      {
                        case 'r':
                          if (hsv) continue;
                          rgb = true;
                          newV.r = value && value.r && value.r | 0 || value && value | 0 || 0;
                          if (newV.r < 0) newV.r = 0;
                          else if (newV.r > 255) newV.r = 255;
                          if (r != newV.r)
                          {
                            r = newV.r;
                            changed = true;
                          }
                          break;
                        case 'g':
                          if (hsv) continue;
                          rgb = true;
                          newV.g = value && value.g && value.g | 0 || value && value | 0 || 0;
                          if (newV.g < 0) newV.g = 0;
                          else if (newV.g > 255) newV.g = 255;
                          if (g != newV.g)
                          {
                            g = newV.g;
                            changed = true;
                          }
                          break;
                        case 'b':
                          if (hsv) continue;
                          rgb = true;
                          newV.b = value && value.b && value.b | 0 || value && value | 0 || 0;
                          if (newV.b < 0) newV.b = 0;
                          else if (newV.b > 255) newV.b = 255;
                          if (b != newV.b)
                          {
                            b = newV.b;
                            changed = true;
                          }
                          break;
                        case 'a':
                          newV.a = value && value.a != null ? value.a | 0 : value != null ? value | 0 : 255;
                          if (newV.a < 0) newV.a = 0;
                          else if (newV.a > 255) newV.a = 255;
                          if (a != newV.a)
                          {
                            a = newV.a;
                            changed = true;
                          }
                          break;
                        case 'h':
                          if (rgb) continue;
                          hsv = true;
                          newV.h = value && value.h && value.h | 0 || value && value | 0 || 0;
                          if (newV.h < 0) newV.h = 0;
                          else if (newV.h > 360) newV.h = 360;
                          if (h != newV.h)
                          {
                            h = newV.h;
                            changed = true;
                          }
                          break;
                        case 's':
                          if (rgb) continue;
                          hsv = true;
                          newV.s = value && value.s != null ? value.s | 0 : value != null ? value | 0 : 100;
                          if (newV.s < 0) newV.s = 0;
                          else if (newV.s > 100) newV.s = 100;
                          if (s != newV.s)
                          {
                            s = newV.s;
                            changed = true;
                          }
                          break;
                        case 'v':
                          if (rgb) continue;
                          hsv = true;
                          newV.v = value && value.v != null ? value.v | 0 : value != null ? value | 0 : 100;
                          if (newV.v < 0) newV.v = 0;
                          else if (newV.v > 100) newV.v = 100;
                          if (v != newV.v)
                          {
                            v = newV.v;
                            changed = true;
                          }
                          break;
                      }
                    }
                    if (changed)
                    {
                      if (rgb)
                      {
                        r = r || 0;
                        g = g || 0;
                        b = b || 0;
                        var ret = ColorMethods.rgbToHsv({ r: r, g: g, b: b });
                        h = ret.h;
                        s = ret.s;
                        v = ret.v;
                      }
                      else if (hsv)
                      {
                        h = h || 0;
                        s = s != null ? s : 100;
                        v = v != null ? v : 100;
                        var ret = ColorMethods.hsvToRgb({ h: h, s: s, v: v });
                        r = ret.r;
                        g = ret.g;
                        b = ret.b;
                      }
                      a = a != null ? a : 255;
                      fireChangeEvents.call($this, context || $this);
                    }
                    break;
                }
              },
            bind =
              function(callback)
              {
                if ($.isFunction(callback)) changeEvents.push(callback);
              },
            unbind =
              function(callback)
              {
                if (!$.isFunction(callback)) return;
                var i;
                while ((i = $.inArray(callback, changeEvents)) != -1) changeEvents.splice(i, 1);
              },
            destroy =
              function()
              {
                changeEvents = null;
              }
          $.extend(true, $this, // public properties and methods
            {
              val: val,
              bind: bind,
              unbind: unbind,
              destroy: destroy
            });
          if (init)
          {
            if (init.ahex != null) val('ahex', init);
            else if (init.hex != null) val((init.a != null ? 'a' : '') + 'hex', init.a != null ? { ahex: init.hex + ColorMethods.intToHex(init.a) } : init);
            else if (init.r != null && init.g != null && init.b != null) val('rgb' + (init.a != null ? 'a' : ''), init);
            else if (init.h != null && init.s != null && init.v != null) val('hsv' + (init.a != null ? 'a' : ''), init);
          }
        }
1263265
function () {
            this.$Input._init.call(this);
            var label = this.getLabel();
            if (label) {
                ariaUtilsEvent.addListener(label, "click", {
                    fn : this._onLabelClick,
                    scope : this
                });
            }
        }
603429
def onload_event
      @onload_event ||= begin
                          ts = @events.select { |event|
                            event.is_a?(LoadEventFired)
                          }.slice(0,1).map(&:timestamp).first
                          ts ? (ts - start_time).round(3) : nil
                        end
    end
943812
function TransportClient() {
        log.info("instantiate websocket");
        // get non-ambiguous this
        var self = this;
        // Call parent constructor
        TransportClient.super_.call(self);
        // Internal structures
        self._ws = undefined;
        self._id = _.uniqueId(); // debugging tool only
        self._state = "NOT_OPENED";
        // state listeners
        self.once("open", function handleOpened() {
            self._state = "OPEN";
        }).once("close", function handleClosed() {
            self._state = "CLOSED";
        });
        // constructor - return undefined
        return undefined;
    }
362050
function ready(callback) {
  let onLoaded = (event) => {
    if (document.addEventListener) {
      document.removeEventListener('DOMContentLoaded', onLoaded, false);
      window.removeEventListener('load', onLoaded, false);
    }
    else if (document.attachEvent) {
      document.detachEvent('onreadystatechange', onLoaded);
      window.detachEvent('onload', onLoaded);
    }

    setTimeout(callback, 1);
  };

  if (document.readyState === 'complete') return setTimeout(callback, 1);

  if (document.addEventListener) {
    document.addEventListener('DOMContentLoaded', onLoaded, false);
    window.addEventListener('load', onLoaded, false);
  }
  else if (document.attachEvent) {
    document.attachEvent('onreadystatechange', onLoaded);
    window.attachEvent('onload', onLoaded);
  }
}
898202
function onLoad() {
    e_interfaceList  = document.getElementById("interface-list")
    e_interfaceName  = document.getElementById("interface-name")
    e_interfaceBody  = document.getElementById("interface-body")
    e_showIdl        = document.getElementById("show-Idl")
    e_showJavaScript = document.getElementById("show-JavaScript")
    e_showJava       = document.getElementById("show-Java")

    setUpShowCheckBoxes()
    populateInterfacesList(IDLTools.getIDLsMatching(/.*/))
}
861775
function loadHooks() {
  var events = this._events;
  var jsFile = /\.js$/i;
  var hooksPath = this.fullPath('hook');
  var loadedHooks = [];
  if (fs.existsSync(hooksPath)) {
    var files = protos.util.ls(hooksPath, jsFile);
    for (var cb,idx,evt,file,len=files.length,i=0; i < len; i++) {
      file = files[i];
      evt = file.replace(jsFile, '');
      loadedHooks.push(evt);
      cb = protos.require(hooksPath + '/' + file, true);
      if (cb instanceof Function) {
        if (RELOADING) {
          var origCb = this.hooks[evt];
          if (origCb instanceof Function) {
            // Hook was added previously
            if (events[evt] instanceof Array) {
              idx = events[evt].indexOf(origCb);
              if (idx >= 0) {
                // If old function is in events array, replace it
                events[evt][idx] = this.hooks[evt] = cb;
              } else {
                // Otherwise, append to events array (add a new event handler)
                events[evt].push(cb);
                this.hooks[evt] = cb;
              }
            } else if (events[evt] instanceof Function) {
              if (events[evt] === origCb) {
                // If evt has only one callback, replace it
                events[evt] = this.hooks[evt] = cb;
              } else {
                // Otherwise, create an array with the old and new events
                events[evt] = [origCb, cb];
              }
            } // No else clause is needed here, it's either Function or Array
          } else {
            // This is a new event handler
            this.hooks[evt] = cb;
            this.on(evt, cb);
          }
        } else {
          // Add the event handler normally
          this.hooks[evt] = cb;
          this.on(evt, cb);
        }
      }
    }
  }

  // Remove any inexisting hooks
  for (evt in this.hooks) {
    if (loadedHooks.indexOf(evt) === -1) {
      app.removeListener(evt, this.hooks[evt]);
      delete this.hooks[evt];
    }
  }

}
1154024
function emitSyncFlag(evt, args) {
            var _this3 = this;

            var async = arguments[2] === undefined ? true : arguments[2];

            var sender = this,
                eH = this[_eventHandlers];

            // emit locally first to onEvent handlers
            try {
                (function () {
                    var onEvent = "on:" + evt,
                        sanitizedEvent = evt.replace(/\:/g, "_"),
                        onSanitizedEvent = "on" + sanitizedEvent,
                        ProperEventCase = sanitizedEvent[0].toUpperCase() + sanitizedEvent.substr(1),
                        onProperEventCase = "on" + ProperEventCase,
                        localHandler = undefined;

                    if (_this3[onEvent]) {
                        localHandler = _this3[onEvent];
                    } else if (_this3[onSanitizedEvent]) {
                        localHandler = _this3[onSanitizedEvent];
                    } else if (_this3[onProperEventCase]) {
                        localHandler = _this3[onProperEventCase];
                    }
                    if (localHandler) {
                        if (async) {
                            setImmediate(function () {
                                tryWrapper.apply(undefined, [localHandler.bind(sender), sender, evt].concat(_toConsumableArray(args)));
                            });
                        } else {
                            tryWrapper.apply(undefined, [localHandler.bind(sender), sender, evt].concat(_toConsumableArray(args)));
                        }
                    }
                })();
            } catch (err) {
                console.log("EMITTER WARNING: Something broke while trying to call local methods.", err);
            }

            core.Array.from(eH)
            // for all the registered event categories, filter out the events that we really care about
            .filter(function (_ref3) {
                var _ref32 = _slicedToArray(_ref3, 1);

                var potentialEvent = _ref32[0];

                if (potentialEvent[0] !== "/") {
                    // the event isn't a regexp -- do a direct string compare
                    return potentialEvent === evt;
                } else {
                    // the event IS a regexp. Split on /, which returns an array of [ don't-care, expression, flags ]

                    var _potentialEvent$split = potentialEvent.split("/");

                    var _potentialEvent$split2 = _slicedToArray(_potentialEvent$split, 3);

                    var exp = _potentialEvent$split2[1];
                    var flags = _potentialEvent$split2[2];

                    // Return the result of the new regular expression.
                    // TODO: I suppose we should think about caching the regular expression objects for performance.
                    return new RegExp(exp, flags).test(evt);
                }
            })
            // and now we want to call each handler
            .forEach(function (_ref4) {
                var _ref42 = _slicedToArray(_ref4, 2);

                var objMap = _ref42[1];

                objMap.forEach(function (handlerSet, thisArg) {
                    if (handlerSet !== undefined) {
                        handlerSet.forEach(function (handler) {
                            if (async) {
                                setImmediate(function () {
                                    tryWrapper.apply(undefined, [handler.bind(thisArg), sender, evt].concat(_toConsumableArray(args)));
                                });
                            } else {
                                tryWrapper.apply(undefined, [handler.bind(thisArg), sender, evt].concat(_toConsumableArray(args)));
                            }
                        });
                    }
                });
            });
        }