xterm.js Development Skill xterm.js ( ) is a full-featured terminal emulator that runs in the browser or Electron. It is NOT a shell -- it must be connected to a backend process (e.g. via node-pty + WebSocket) to execute commands. --- 1. Installation Always import the CSS: Or in JS/TS: --- 2. Basic Setup Critical : Always call AFTER the element is in the DOM. Use (not just ) for newlines when writing directly. --- 3. Official Addons | Addon | Package | Purpose | |---|---|---| | FitAddon | | Resize terminal to fill its container | | AttachAddon | | Connect to a WebSocket backend | | SearchAddo…