Fix demo. Clear addons list on terminal recreation

This commit is contained in:
Sergey Volkov
2020-05-06 15:28:23 +03:00
committed by GitHub
parent f9adf8ad83
commit 71e45cdd25
+3 -1
View File
@@ -392,7 +392,9 @@ function initAddons(term: TerminalType): void {
wrapper.appendChild(label);
fragment.appendChild(wrapper);
});
document.getElementById('addons-container').appendChild(fragment);
const container = document.getElementById('addons-container');
container.innerHTML = '';
container.appendChild(fragment);
}
function addDomListener(element: HTMLElement, type: string, handler: (...args: any[]) => any): void {