UNPKG

ascii-ui

Version:

Graphic terminal emulator for HTML canvas elements

23 lines 614 B
export class TerminalEvent { constructor(options, data) { this.cancelled = false; if (typeof options === 'string') { this.type = options; this.cancellable = true; } else { this.type = options.type; this.cancellable = options.cancellable === undefined ? true : options.cancellable; } this.data = data; } stopPropagation() { if (this.cancellable) { this.cancelled = true; } } isCancelled() { return this.cancelled; } } //# sourceMappingURL=TerminalEvent.js.map