mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
Fix postMessage arguments to efficiently send binary data to webview
This commit is contained in:
@ -34,7 +34,7 @@ class PawDrawDocument extends Disposable implements vscode.CustomDocument {
|
||||
if (uri.scheme === 'untitled') {
|
||||
return new Uint8Array();
|
||||
}
|
||||
return vscode.workspace.fs.readFile(uri);
|
||||
return new Uint8Array(await vscode.workspace.fs.readFile(uri));
|
||||
}
|
||||
|
||||
private readonly _uri: vscode.Uri;
|
||||
|
||||
Reference in New Issue
Block a user