mirror of
https://github.com/tsl0922/ttyd.git
synced 2026-01-02 17:04:24 +01:00
html: handle binary xterm event
This commit is contained in:
@@ -210,6 +210,7 @@ export class Xterm extends Component<Props, State> {
|
||||
}
|
||||
});
|
||||
terminal.onData(this.onTerminalData);
|
||||
terminal.onBinary(this.onTerminalBinary);
|
||||
terminal.onResize(this.onTerminalResize);
|
||||
if (document.queryCommandSupported && document.queryCommandSupported('copy')) {
|
||||
terminal.onSelectionChange(() => {
|
||||
@@ -484,4 +485,9 @@ export class Xterm extends Component<Props, State> {
|
||||
private onTerminalData(data: string) {
|
||||
this.sendData(data);
|
||||
}
|
||||
|
||||
@bind
|
||||
private onTerminalBinary(data: string) {
|
||||
this.sendData(Uint8Array.from(data, v => v.charCodeAt(0)));
|
||||
}
|
||||
}
|
||||
|
||||
1847
src/html.h
generated
1847
src/html.h
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user