From 1d68dedaccac3638b95b55824fc9ed6685148b0d Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Wed, 22 Mar 2023 08:37:56 -0400 Subject: [PATCH] Should not throw for children of iframe or object --- packages/react-dom-bindings/src/client/ReactDOMComponent.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-dom-bindings/src/client/ReactDOMComponent.js b/packages/react-dom-bindings/src/client/ReactDOMComponent.js index 144830c7651c5..eb09ca854e5ce 100644 --- a/packages/react-dom-bindings/src/client/ReactDOMComponent.js +++ b/packages/react-dom-bindings/src/client/ReactDOMComponent.js @@ -595,8 +595,6 @@ export function setInitialProperties( listenToNonDelegatedEvent('close', domElement); props = rawProps; break; - case 'iframe': - case 'object': case 'embed': if ( rawProps.children != null || @@ -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);