all files / src/ generic-event.js

100% Statements 5/5
100% Branches 0/0
100% Functions 3/3
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35                                                           
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * GenericEvent is the base class for classes containing event data.
 */
class GenericEvent {
    constructor() {
        /**
         * Whether no further event listeners should be triggered.
         *
         * @type {boolean}
         */
        this.propagationStopped = false;
    }
    /**
     * Returns whether further event listeners should be triggered.
     *
     * @returns {boolean}
     */
    isPropagationStopped() {
        return this.propagationStopped;
    }
    /**
     * Stops the propagation of the event to further event listeners.
     *
     * If multiple event listeners are connected to the same event, no
     * further event listener will be triggered once any trigger calls
     * stopPropagation().
     */
    stopPropagation() {
        this.propagationStopped = true;
    }
}
exports.GenericEvent = GenericEvent;
//# sourceMappingURL=generic-event.js.map