Merge branch 'master' into htmlserialize

This commit is contained in:
Megan Rogge
2022-02-10 10:29:43 -06:00
committed by GitHub
12 changed files with 349 additions and 17 deletions
+10
View File
@@ -150,6 +150,7 @@ if (document.location.pathname === '/test') {
document.getElementById('htmlserialize').addEventListener('click', htmlSerializeButtonHandler);
document.getElementById('custom-glyph').addEventListener('click', writeCustomGlyphHandler);
document.getElementById('load-test').addEventListener('click', loadTest);
document.getElementById('add-decoration').addEventListener('click', addDecoration);
}
function createTerminal(): void {
@@ -541,3 +542,12 @@ function loadTest() {
term._core._onData.fire('\x03');
});
}
function addDecoration() {
const marker = term.addMarker(1);
const decoration = term.registerDecoration({ marker });
term.write('');
decoration.onRender(() => {
decoration.element.style.backgroundColor = 'red';
});
}