function dispatch(name, data) {
            data = data || empty();
            var defaultPrevented = false;
            definedEvents.get(name).register.forEach(
                function call(currentHandler) {
                    data.preventDefault = function preventDefault() {
                        if (definedEvents.get(name).cancellable) {
                            defaultPrevented = true;
                        }
                    };
                    currentHandler(data);
                }
            );
            if (
                !defaultPrevented &&
                definedEvents.get(name).default
            ) {
                definedEvents.get(name).default(data);
            }
        }
Dispatch event <name> with arguments <data>
@param {string} name The name of the event
@param {Object|undefined} data Data of the event
@returns {undefined}