try {
navigator.clipboard.write([
new ClipboardItem({
'image/png': pngImageBlob
})
]);
} catch (error) {
console.error(error);
}
// Copies the image as a blob to the clipboard (PNG only)
navigator.clipboard.write([
new ClipboardItem({
[blob.type]: blob,
}),
])
navigator.clipboard.write([
new ClipboardItem({ "image/png": blob })
]);