Created
December 3, 2016 04:26
-
-
Save jgillich/596a9254155b3036a85b3fc629220e9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<div id="terminal" | |
style="position:relative; width:100%; height:500px"></div> | |
</body> | |
<script src="hterm_all.js"></script> | |
<script> | |
hterm.defaultStorage = new lib.Storage.Local() | |
var t = new hterm.Terminal("foo") | |
t.onTerminalReady = function() { | |
var io = t.io.push(); | |
io.onVTKeystroke = function(str) { | |
console.log(str) | |
}; | |
io.sendString = function(str) { | |
console.log(str) | |
}; | |
}; | |
t.decorate(document.querySelector('#terminal')); | |
t.io.println('Print a string and add CRLF'); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment