Add a webgl button to the demo

This commit is contained in:
Daniel Imms
2019-06-15 00:04:02 -07:00
parent 50d6711fc8
commit eae0ab9e02
2 changed files with 2 additions and 2 deletions
+1 -2
View File
@@ -45,8 +45,6 @@ let socketURL;
let socket;
let pid;
(<any>window).webgl = () => term.loadAddon(new WebglAddon());
const terminalContainer = document.getElementById('terminal-container');
const actionElements = {
findNext: <HTMLInputElement>document.querySelector('#find-next'),
@@ -91,6 +89,7 @@ if (document.location.pathname === '/test') {
} else {
createTerminal();
document.getElementById('dispose').addEventListener('click', disposeRecreateButtonHandler);
document.getElementById('webgl').addEventListener('click', () => term.loadAddon(new WebglAddon()));
}
function createTerminal(): void {
+1
View File
@@ -36,6 +36,7 @@
<hr/>
<p><strong>Attention:</strong> The demo is a barebones implementation and is designed for the development and evaluation of xterm.js only. Exposing the demo to the public as is would introduce security risks for the host.</p>
<button id="dispose" title="This is used to testing memory leaks">Dispose terminal</button>
<button id="webgl"">Enable WebGL Renderr</button>
<script src="dist/client-bundle.js" defer ></script>
</body>
</html>