diff --git a/src/renderers/dom.js b/src/renderers/dom.js index a3b62ca..722c89e 100644 --- a/src/renderers/dom.js +++ b/src/renderers/dom.js @@ -122,7 +122,11 @@ function addProps(el: HTMLElement | Element, node) { // 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)) { + if ( + el.tagName.toLowerCase() === ELEMENT_TAG.IFRAME && + !props.srcdoc && + !props.src + ) { el.setAttribute('srcdoc', ''); } }