Skip to content

Commit

Permalink
Fix facebook#5839 Add error event to source element
Browse files Browse the repository at this point in the history
  • Loading branch information
wadahiro committed Jun 1, 2016
1 parent 51f8b1b commit 5c2d95a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/renderers/dom/shared/ReactDOMComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,15 @@ function trapBubbledEventsLocal() {
);
}
}

break;
case 'source':
inst._wrapperState.listeners = [
ReactBrowserEventEmitter.trapBubbledEvent(
EventConstants.topLevelTypes.topError,
'error',
node
),
];
break;
case 'img':
inst._wrapperState.listeners = [
Expand Down Expand Up @@ -535,6 +543,7 @@ ReactDOMComponent.Mixin = {
case 'img':
case 'link':
case 'object':
case 'source':
case 'video':
this._wrapperState = {
listeners: null,
Expand Down Expand Up @@ -1124,6 +1133,7 @@ ReactDOMComponent.Mixin = {
case 'img':
case 'link':
case 'object':
case 'source':
case 'video':
var listeners = this._wrapperState.listeners;
if (listeners) {
Expand Down

0 comments on commit 5c2d95a

Please sign in to comment.