Skip to content

Commit

Permalink
Should not throw for children of iframe or object (#26458)
Browse files Browse the repository at this point in the history
Still needs a regression test to test this for the future.
  • Loading branch information
sebmarkbage authored Mar 22, 2023
1 parent c0b34bc commit b93b4f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/react-dom-bindings/src/client/ReactDOMComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,6 @@ export function setInitialProperties(
listenToNonDelegatedEvent('close', domElement);
props = rawProps;
break;
case 'iframe':
case 'object':
case 'embed':
if (
rawProps.children != null ||
Expand All @@ -608,6 +606,9 @@ export function setInitialProperties(
'use `dangerouslySetInnerHTML`.',
);
}
// eslint-disable-next-line no-fallthrough
case 'iframe':
case 'object':
// We listen to this event in case to ensure emulated bubble
// listeners still fire for the load event.
listenToNonDelegatedEvent('load', domElement);
Expand Down

0 comments on commit b93b4f0

Please sign in to comment.