index.js
function (event) {
        var trigger = event.target;
        var probe = function (type) {
            if ((type !== event.type) || (1 !== trigger.nodeType)) {
                return false;
            }

            var attribute = ['data', this.id, type].join('-');
            var key = trigger.getAttribute(attribute);

            if (key && this.registry.hasOwnProperty(key)) {
                this.registry[key](event, trigger);
                return true;
            }

            if (-1 !== this.bubble.indexOf(type)) {
                while (this.documentElement !== trigger) {
                    trigger = trigger.parentNode;

                    if (probe(type)) {
                        break;
                    }
                }
            }

            return false;
        }.bind(this);

        this.events.forEach(probe);
    }
function (event) {
        var trigger = event.target;
        var probe = function (type) {
            if ((type !== event.type) || (1 !== trigger.nodeType)) {
                return false;
            }

            var attribute = ['data', this.id, type].join('-');
            var key = trigger.getAttribute(attribute);

            if (key && this.registry.hasOwnProperty(key)) {
                this.registry[key](event, trigger);
                return true;
            }

            if (-1 !== this.bubble.indexOf(type)) {
                while (this.documentElement !== trigger) {
                    trigger = trigger.parentNode;

                    if (probe(type)) {
                        break;
                    }
                }
            }

            return false;
        }.bind(this);

        this.events.forEach(probe);
    }
function ( event ) { var trigger = event . target ; var probe = function ( type ) { if ( ( type !== event . type ) || ( 1 !== trigger . nodeType ) ) { return false ; } var attribute = [ 'data' , this . id , type ] . join ( '-' ) ; var key = trigger . getAttribute ( attribute ) ; if ( key && this . registry . hasOwnProperty ( key ) ) { this . registry [ key ] ( event , trigger ) ; return true ; } if ( - 1 !== this . bubble . indexOf ( type ) ) { while ( this . documentElement !== trigger ) { trigger = trigger . parentNode ; if ( probe ( type ) ) { break ; } } } return false ; } . bind ( this ) ; this . events . forEach ( probe ) ; }
Delegate the event.
@param {Event} event
Delegate the event .