How to get animated gif image from api browser clipboard?

I am testing the following code, and when I copy the animated gif and paste it into a web page, I see image/pngin the console - instead image/gif, as expected.

Why?

document.onpaste = function(event) {
  console.log(event.clipboardData.items[1]['type']); // 'image/png'
};

How can I match the gif?

You can check this on jsfiddle with this gif, for example.

+5
source share
2 answers

CF_GIF . CF_BITMAP, CF_ENHMETAFILE CF_DIB. , , PNG Bitmap. , GIF, , , PNG . GIF . , CF_HDROP, CF_FileName ..

+2

gif- (), , " ", , . , .

0

All Articles