a hypothetic 'iframe UI component' is installed in here and its internal code is more of less the following running from the main DOM
let iframe = document.createElement('iframe')
document.body.appendChild(iframe)
let iframeDocument = iframe.contentWindow.document
let snippet = document.createElement('script')
snippet.src = "https://config.gorgias.chat/gorgias-chat-bundle-loader.js?applicationId=15545"
iframeDocument.body.appendChild(snippet)
Button below is originaly named 'This button' and have no behavior when clicked.
The iframe have the same origin, therefore the main DOM can be altered by the JS inside the DOM