xterm.js: Terminal is not defined
I want to add your terminal in my app so I import the JS like this this
<script src="js/xterm.js" type="text/javascript"></script>
and it’s imported if I check in the dev terminal.
Then in want to add the terminal like you did in your example:
<div id="terminal"></div>
<script>
var term = new Terminal();
term.open(document.getElementById('#terminal'));
term.write('Hello from \033[1;3;31mxterm.js\033[0m $ ')
</script>
But I got the error Terminal is not defined
on the line var term = new Terminal();
Details
- Browser and browser version: Chrome 55.0.2883.95
- OS version: OS X El Capitan 10.11.6
- xterm.js version: the one of the 16th January 2017
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (8 by maintainers)
VS Code has it’s own fit logic, no addons used there right now, I imagine
loadAddon
would work though.