diff --git a/demo/index.html b/demo/index.html index f374d998..fff77d09 100644 --- a/demo/index.html +++ b/demo/index.html @@ -32,6 +32,7 @@

Attention: 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.

+ diff --git a/demo/main.js b/demo/main.js index 1ed6a180..004a48f0 100644 --- a/demo/main.js +++ b/demo/main.js @@ -76,6 +76,12 @@ function createTerminal() { term.fit(); term.focus(); + document.getElementById('dispose').addEventListener('click', () => { + term.dispose(); + term = null; + window.term = null; + }); + // fit is called within a setTimeout, cols and rows need this. setTimeout(function () { initOptions(term);