Move JavaScript around because I want to!

This commit is contained in:
Michał Gdula 2023-04-07 14:51:03 +00:00
parent 6bee5a7113
commit 4622cc29c5
7 changed files with 19 additions and 18 deletions

View file

@ -0,0 +1,10 @@
async function checkWebpSupport() {
var webpSupport = false;
try {
webpSupport = document.createElement('canvas').toDataURL('image/webp').indexOf('data:image/webp') == 0;
} catch (e) {
webpSupport = false;
}
return webpSupport;
}