Files
xterm.js/src/addons/fit

fit addon

The fit addon adjusts the dimensions of the terminal to match best fit its parent element container. fit will only work when the element is visible.