Skip to content

Commit 110af88

Browse files
committed
Simplify URL API initialization.
Only Chromium versions between M8 and M10 used window.createObjectURL and are not in use anymore. Opera 12 is also not in use anymore and makes the check for URL.revokeObjectURL obsolete.
1 parent d5092c6 commit 110af88

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

js/load-image.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* https://opensource.org/licenses/MIT
1010
*/
1111

12-
/* global define, module, Promise, webkitURL */
12+
/* global define, module, Promise */
1313

1414
;(function ($) {
1515
'use strict'
@@ -112,12 +112,8 @@
112112
}
113113
return executor(callback, callback)
114114
}
115-
// The check for URL.revokeObjectURL fixes an issue with Opera 12,
116-
// which provides URL.createObjectURL but doesn't properly implement it:
117-
var urlAPI =
118-
($.createObjectURL && $) ||
119-
($.URL && URL.revokeObjectURL && URL) ||
120-
($.webkitURL && webkitURL)
115+
116+
var urlAPI = $.URL || $.webkitURL
121117

122118
/**
123119
* Helper function to revoke an object URL

0 commit comments

Comments
 (0)