| 866 | }, |
| 867 | |
| 868 | postUserEvent(tag: number, payload: Uint8Array): void { |
| 869 | if (disposed) throw new Error("NodeBackend: disposed"); |
| 870 | if (fatal !== null) throw fatal; |
| 871 | if (worker === null) throw new Error("NodeBackend: not started"); |
| 872 | if (stopRequested) throw new Error("NodeBackend: stopped"); |
| 873 | |
| 874 | const buf = new ArrayBuffer(payload.byteLength); |
| 875 | copyInto(buf, payload); |
| 876 | send({ type: "postUserEvent", tag, payload: buf, byteLen: payload.byteLength }, [buf]); |
| 877 | }, |
| 878 | |
| 879 | async commitScrollback(drawlist: Uint8Array, rows: number): Promise<void> { |
| 880 | if (disposed) throw new Error("NodeBackend: disposed"); |