diff --git a/src/renderers/dom.js b/src/renderers/dom.js index a3b62ca..94a0909 100644 --- a/src/renderers/dom.js +++ b/src/renderers/dom.js @@ -122,8 +122,12 @@ 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)) { - el.setAttribute('srcdoc', ''); + if ( + el.tagName.toLowerCase() === ELEMENT_TAG.IFRAME && + !props.srcdoc && + !props.src + ) { + el.setAttribute("srcdoc", ""); } } const ADD_CHILDREN: {