Just a heads up, xtermjs has now updated to version 4[1]. You might want to consider for an upgrade.
1: https://github.com/xtermjs/xterm.js/releases