Skip to content

Commit b6240f7

Browse files
author
Kewei Jiang
committed
add crossorigin attribute to img tag
1 parent e19f531 commit b6240f7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

js/load-image.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// element (if supported by the browser) as parameter:
2020
function loadImage (file, callback, options) {
2121
var img = document.createElement('img')
22+
img.setAttribute('crossorigin', 'anonymous')
2223
var url
2324
img.onerror = function (event) {
2425
return loadImage.onerror(img, event, file, callback, options)

0 commit comments

Comments
 (0)