Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use callback for toBlob in clipboard write example #33000

Merged
merged 6 commits into from
May 3, 2024
Merged
Prev Previous commit
Next Next commit
Update files/en-us/web/api/clipboard/write/index.md
  • Loading branch information
Josh-Cena committed Apr 8, 2024
commit 67719a4601735ad3ad7c61a9baee5ee1819e3fa9
2 changes: 1 addition & 1 deletion files/en-us/web/api/clipboard/write/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ canvas.addEventListener("click", copyCanvasContentsToClipboard);
async function copyCanvasContentsToClipboard() {
// Copy canvas to blob
canvas.toBlob(async (blob) => {
// Create ClipboardItem with blob and it's type, and add to an array
// Create ClipboardItem with blob and its type, and add to an array
const data = [new ClipboardItem({ [blob.type]: blob })];
// Write the data to the clipboard
await navigator.clipboard.write(data);
Expand Down