Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

661
Views
XTermjs - How to resize XTerm terminal to match the exact dimensions of the window?

I have the following code that is part of a React class component:

render () {
    return (
        <div id = 'remote-console'>
        </div>
    )
}

and my application currently opens a new browser window with a console interface. I was wondering how I would be able to make this window resizable (and have the xterm console fit to the new dimensions). I currently use the FitAddon addon for xterm, but I'm not sure how to get the console to resize to the size of the current window (including the height)

componentDidMount() {
    this.console = new Terminal()
    this.fitAddon = new FitAddon()
    this.console.loadAddon(this.fitAddon)
    this.console.open(document.getElementById('remote-console'))
    this.fitAddon.fit()
    window.onresize = function () {
        this.fitAddon.fit()
    }
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!