feat: save frame as image

This commit is contained in:
Maze Winther
2026-02-23 06:44:27 +01:00
parent 71970d5f5f
commit 5616d4e9f3
3 changed files with 88 additions and 0 deletions
+17
View File
@@ -1,3 +1,20 @@
export function downloadBlob({
blob,
filename,
}: {
blob: Blob;
filename: string;
}): void {
const url = URL.createObjectURL(blob);
const anchor = document.createElement("a");
anchor.href = url;
anchor.download = filename;
document.body.appendChild(anchor);
anchor.click();
document.body.removeChild(anchor);
URL.revokeObjectURL(url);
}
export function isTypableDOMElement({
element,
}: {