- Add onBell event listener to allow embeders to hook into it
This commit is contained in:
Bruno Ribeiro
2021-04-03 16:34:00 +01:00
parent 0421f6ebcf
commit 7b7b7a36db
8 changed files with 30 additions and 0 deletions
+10
View File
@@ -410,6 +410,16 @@ describe('API Integration Tests', function(): void {
await page.evaluate(`window.term.write('\\x1b]2;foo\\x9c')`);
await pollFor(page, `window.calls`, ['foo']);
});
it('onBell', async () => {
await openTerminal(page);
await page.evaluate(`
window.calls = [];
window.term.onBell(e => window.calls.push(e));
`);
await pollFor(page, `window.calls`, []);
await page.evaluate(`window.term.write('\\a')`);
await pollFor(page, `window.calls`, ['foo']);
});
});
describe('buffer', () => {