I am testing the following code, and when I copy an animated gif and paste it to web page, I see image/png
in the console - instead of image/gif
as expected.
Why?
document.onpaste = function(event) {
console.log(event.clipboardData.items[1]['type']); // 'image/png'
};
How can I match a gif image?
You can test it at this jsfiddle with this gif image for example.