0

I'm working with Vue.js 2 and, in the Script of a component, I'm trying to copy an image to the clipboard of the user. In order to do that, I converted the image to a blob and then, when I was trying to use the Clipboard API, a message was shown in the browser's console:

ClipboardItem is not defined

This is while trying to initialize an ClipboardItem. I'm working with the Chrome browser.

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
  • 1
    Maybe this answer can help? https://stackoverflow.com/a/51823007 – Gabe Jun 27 '22 at 08:32
  • 5
    Please post code as text, not as image. – Kaiido Jun 27 '22 at 09:11
  • 1
    Which browser? Firefox by default does not support `ClipboardItem`. – RoToRa Jun 27 '22 at 11:45
  • Please review *[Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/)* (e.g., *"Images should only be used to illustrate problems that* ***can't be made clear in any other way,*** *such as to provide screenshots of a user interface."*) and [do the right thing](https://stackoverflow.com/posts/72769000/edit). Thanks in advance. – Peter Mortensen Mar 22 '23 at 12:39

0 Answers0