Skip to content
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 onError to ReactDOMImg to complement onLoad #855

Merged
merged 1 commit into from
Feb 13, 2014
Merged

Add onError to ReactDOMImg to complement onLoad #855

merged 1 commit into from
Feb 13, 2014

Conversation

syranide
Copy link
Contributor

@syranide syranide commented Jan 9, 2014

@spicyj added the the useful onLoad, lets complement it with onError for those times the images doesn't load. :)

It is possible that we may want to overload onLoad to sometimes emit onError instead. I've seen people comment in various places that sometimes images fails to load but emit onLoad with 0 width/height image instead. But I wasn't able to reproduce it myself in IE8-11 and edge versions of browsers.

@petehunt
Copy link
Contributor

petehunt commented Jan 9, 2014

seems legit

@vjeux
Copy link
Contributor

vjeux commented Jan 9, 2014

For FB people going to take this kind of code. When pulling in, make sure that you check for existing code that uses the same name using onError=. For onLoad it broke two call sites that accidentally transferred it to DOM nodes using this.transferPropsTo.

@syranide
Copy link
Contributor Author

@petehunt Rebased.

@petehunt
Copy link
Contributor

pulling in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants