Use Image.prototype.decode also in Safari

This commit is contained in:
ahocevar
2019-06-23 14:06:14 +02:00
parent 8a49e06ebd
commit 3557271e5a
2 changed files with 15 additions and 6 deletions
+6
View File
@@ -38,3 +38,9 @@ export const MAC = ua.indexOf('macintosh') !== -1;
* @api
*/
export const DEVICE_PIXEL_RATIO = window.devicePixelRatio || 1;
/**
* Image.prototype.decode() is supported.
* @type {boolean}
*/
export const IMAGE_DECODE = typeof Image !== 'undefined' && Image.prototype.decode;