Skip to content

Commit b93b4f0

Browse files
authored
Should not throw for children of iframe or object (#26458)
Still needs a regression test to test this for the future.
1 parent c0b34bc commit b93b4f0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/react-dom-bindings/src/client/ReactDOMComponent.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,6 @@ export function setInitialProperties(
595595
listenToNonDelegatedEvent('close', domElement);
596596
props = rawProps;
597597
break;
598-
case 'iframe':
599-
case 'object':
600598
case 'embed':
601599
if (
602600
rawProps.children != null ||
@@ -608,6 +606,9 @@ export function setInitialProperties(
608606
'use `dangerouslySetInnerHTML`.',
609607
);
610608
}
609+
// eslint-disable-next-line no-fallthrough
610+
case 'iframe':
611+
case 'object':
611612
// We listen to this event in case to ensure emulated bubble
612613
// listeners still fire for the load event.
613614
listenToNonDelegatedEvent('load', domElement);

0 commit comments

Comments
 (0)