-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
logo加载不出来 #8
Comments
var img = new Image();
img.onload = function() {
// Use the img
};
img.src = "Some URL"; You can also take a look at: https://jsfiddle.net/sumimakito/45L3okhe/1/ UPDATE: var img = new Image();
img.crossOrigin = "Anonymous";
img.onload = function() {
// Use the img
};
img.src = "Some URL"; Also, you can follow the steps in this article: https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image |
Thank you, I get it. |
I've tried onload function, but it still doesn't work. |
That's right. Without setting the "crossOrigin" property, the Image will suffer security issues while loading images from external resources. |
The text was updated successfully, but these errors were encountered: