js webp支持判断
function isSuppportWebp () {
try {
return document.createElement('canvas').toDataURL('image/webp', 0.5).indexOf('data:image/webp') === 0;
} catch (e) {
return false
}
}
function isSuppportWebp () {
try {
return document.createElement('canvas').toDataURL('image/webp', 0.5).indexOf('data:image/webp') === 0;
} catch (e) {
return false
}
}