mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
@@ -485,6 +485,7 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
||||
this.viewport.syncScrollArea();
|
||||
break;
|
||||
case 'tabStopWidth': this.setupStops(); break;
|
||||
case 'bellSound': this.syncBellSound(); break;
|
||||
case 'bellStyle': this.preloadBellSound(); break;
|
||||
}
|
||||
}
|
||||
@@ -2303,6 +2304,12 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
||||
this.helperContainer.removeChild(this.bellAudioElement);
|
||||
}
|
||||
}
|
||||
|
||||
private syncBellSound(): void {
|
||||
if (this.soundBell() && this.bellAudioElement) {
|
||||
this.bellAudioElement.setAttribute('src', this.options.bellSound);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,6 +31,7 @@ export type BooleanOption =
|
||||
export type StringOption =
|
||||
'cursorStyle' |
|
||||
'bellStyle' |
|
||||
'bellSound' |
|
||||
'termName';
|
||||
export type StringArrayOption = 'colors';
|
||||
export type NumberOption =
|
||||
|
||||
Reference in New Issue
Block a user