From 6f2e0f7ea43a2787824a6a4b55a9195816b69df9 Mon Sep 17 00:00:00 2001 From: dtjones404 <69579929+dtjones404@users.noreply.github.com> Date: Wed, 2 Oct 2024 17:10:47 -0400 Subject: [PATCH] =?UTF-8?q?Revert=20"fix(iframe):=20add=20empty=20srcdoc?= =?UTF-8?q?=20attribute=20to=20iframe=20elem=20if=20not=20exist=20(?= =?UTF-8?q?=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit b21a46826fe3369ded96cbba6dfd44b955a87a34. --- src/renderers/dom.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/renderers/dom.js b/src/renderers/dom.js index 94a0909..ded181e 100644 --- a/src/renderers/dom.js +++ b/src/renderers/dom.js @@ -118,17 +118,6 @@ function addProps(el: HTMLElement | Element, node) { if (el.tagName.toLowerCase() === ELEMENT_TAG.IFRAME && !props.id) { el.setAttribute(ELEMENT_PROP.ID, `jsx-iframe-${uniqueID()}`); } - - // If the element is an iframe and it has no srcdoc or src, set the srcdoc to an empty string. - // Content specified via srcdoc is treated as being from the same origin as the parent document. - // In some browsers (like Safari 17+), empty iframes without src or srcdoc may be treated as "anonymous," potentially blocking certain content. - if ( - el.tagName.toLowerCase() === ELEMENT_TAG.IFRAME && - !props.srcdoc && - !props.src - ) { - el.setAttribute("srcdoc", ""); - } } const ADD_CHILDREN: { [string]: (HTMLElement | Element, ElementNode, DomNodeRenderer) => void,