Skip to content

Commit

Permalink
fix: remove crossOrigin for image(#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
nzbin committed Sep 10, 2024
1 parent 5525fd5 commit 45e30ae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class PhotoViewer {
${this._createTitle()}
</div>
<div class="${NS}-stage">
<img class="${NS}-image" src="" alt="" crossorigin="anonymous" />
<img class="${NS}-image" src="" alt="" />
</div>
<div class="${NS}-footer">
<div class="${NS}-toolbar ${NS}-toolbar-footer">
Expand Down
2 changes: 0 additions & 2 deletions src/js/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ export function throttle(fn, timeFrame) {
export function preloadImage(src, success, error) {
const img = new Image();

img.crossOrigin = 'anonymous';

img.onload = function () {
success(img);
};
Expand Down

0 comments on commit 45e30ae

Please sign in to comment.