-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add "Image" to Graphics.Canvas #20
Comments
We have We'd have to add a dependency on |
Howdy! Realizing that this is a pretty old issue at this point, but I ran across it due to running into some limitations with the current I've basically run into two main pain points. (1) a lack of control when calling The first is about browser security. Without any ability to customize the export function tryLoadImageImpl(src) {
return function(e) {
return function(f) {
return function () {
var img = new Image();
img.src = src;
img.crossOrigin = "anonymous" // <--- This part
img.addEventListener("load", function() {
f(img)();
}, false);
img.addEventListener("error", function() {
e();
}, false);
};
};
};
} If you want to avoid a full dependency on type ImageProps = {src :: String, crossOrgin :: Maybe String} -- and so on
tryLoadImageFull :: ImageProps -> (Maybe CanvasImageSource → Effect Unit) → Effect Unit The second issue I've run into is with Anywho, there's my $0.02. |
Guess this belongs to Graphics.Canvas:
foreign import data Image :: *
The text was updated successfully, but these errors were encountered: