A terminal for the web
Make sure you update your xterm.css file if you have your own copy as there were some changes made there (https://github.com/xtermjs/xterm.js/issues/3579).
Terminal.options
API (#3546, #3586) via @silamon
// before
term.setOption('rendererType', 'dom');
term.setOption('fontSize', 12);
// after
term.options = {
rendererType: 'dom',
fontSize: 12
};
IKeyboardEvent.keyCode
as deprecated (#3582) via @Tyriar[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
xterm-addon-unicode11@...
[email protected]
[email protected]
terminal.options
(#3448) via @silamonInputHandler
tests (#3523) via @jerchUse term.options
over term.setOption
/getOption
:
// before
term.setOption('rendererType', 'dom');
// after
term.options.rendererType = 'dom';
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Pull from https://github.com/xtermjs/xtermjs.org/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Aclosed
xterm-headless
is a new package available on npm that allows xterm to run in a headless mode within node.js (#3212, #3214, #3413, #3414, #3420, #3421) via @Tyriar, @joyceerhlmodes
API exposes the terminal's internal modes (#3418) via @Tyriar. These are used for example in the xterm-addon-serialize to enable mode serialization.
if (terminal.modes.applicationCursorKeysMode) {
// DECCKM is enabled (CSI ? 1 h)
}
navigator
typing issues (#3371) via @LabhanshAgrawal\
is now correctly treated as a non-word character (#3405) via @alur[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
// Handle \x1b[<params>+Z using an asynchronous handler
terminal.parser.registerCsiHandler({intermediates:'+', final: 'Z'}, async params => {
await new Promise(res => setTimeout(res, 50));
return false;
});
onBell
event API so embedders can handle the bell however they want (#3290, #3295) via @bmf-ribeiro
terminal.onBell(() => customBellImpl());
open
is called (#3314) via @jeanp413navigator.fonts
API (#3264) via @LabhanshAgrawal[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
new Terminal({
altClickMovesCursor: false
});
fontWeight
and fontWeightBold
options (#3062) via @IllusionMH, this now matches the types that the CSS style supports.dispose
function on ILink
(#3073) via @Tyriar, this allows consumers to be notified when links are no longer needed which was difficult to observe before.Terminal.open
is called during an animation (#3008) via @andrew-schlackmansetOption
(#3064) via @IllusionMHgetOption('fontWeight')
and getOption('fontWeightBold')
now returns string | number
instead of string
:
// before 4.9.0
const weight: string = term.getOption('fontWeight');
// after 4.9.0
const weight: string | number = term.getOption('fontWeight');
This change accepted as the impact on consumers should be minimal due to the low usage of the API.WebglAddon.clearTextureAtlas
API (#3075) via @Tyriar, this is useful to completely clear the atlas when corruption may have happened (eg. when canvas textures are lost after system sleep/resume).[email protected]
[email protected]
[email protected]
(this addon may have issues)[email protected]
[email protected]
[email protected]
[email protected]
[email protected]