mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
offload raw image data to Blob for off-heap storage
This commit is contained in:
@@ -156,7 +156,11 @@ test.describe('Kitty Graphics Protocol', () => {
|
||||
await ctx.proxy.write(`\x1b_Ga=t,f=100,i=99;${part2}\x1b\\`);
|
||||
await timeout(100);
|
||||
|
||||
const storedData = await ctx.page.evaluate(`Array.from(window.imageAddon._handlers.get('kitty').images.get(99).data)`);
|
||||
const storedData = await ctx.page.evaluate(async () => {
|
||||
const blob = (window as any).imageAddon._handlers.get('kitty').images.get(99).data;
|
||||
const buffer = await blob.arrayBuffer();
|
||||
return Array.from(new Uint8Array(buffer));
|
||||
});
|
||||
deepStrictEqual(storedData, KITTY_BLACK_1X1_BYTES);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user