mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-08 17:46:35 +08:00
Android: Expose Image's onError event to JavaScript
Summary: iOS supports an Image onError event. Android was firing the event but it was never reaching JavaScript because Android didn't include this event in `getExportedCustomDirectEventTypeConstants`. **Test plan (required)** Verified that the `onError` event now fires in a test app. My team uses this change in our app. Adam Comella Microsoft Corp. Closes https://github.com/facebook/react-native/pull/10902 Differential Revision: D4180149 Pulled By: ericvicenti fbshipit-source-id: 4bf0b9aa7dc221d838d7b6b3e88bb47196dcadef
This commit is contained in:
committed by
Facebook Github Bot
parent
191db90345
commit
e87e181998
@@ -178,6 +178,8 @@ public class ReactImageManager extends SimpleViewManager<ReactImageView> {
|
||||
MapBuilder.of("registrationName", "onLoadStart"),
|
||||
ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_LOAD),
|
||||
MapBuilder.of("registrationName", "onLoad"),
|
||||
ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_ERROR),
|
||||
MapBuilder.of("registrationName", "onError"),
|
||||
ImageLoadEvent.eventNameForType(ImageLoadEvent.ON_LOAD_END),
|
||||
MapBuilder.of("registrationName", "onLoadEnd"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user