Glossary

/

Widget, Integration & Privacy

/

Iframe

Iframe

An iframe (inline frame) is an HTML element that embeds a separate, self-contained HTML document inside the current page, giving the embedded content its own DOM, stylesheets, and JavaScript scope. It is one of the classic ways to drop third-party UI like a chat widget onto a host website without its code clashing with the page.

Updated June 25, 2026

Widget, Integration & Privacy

TL;DR

An iframe embeds a fully separate web page inside another page; many chat widgets use it for isolation, though Eloqra reaches the same goal with Shadow DOM instead.

Key Points

An iframe creates a nested browsing context with its own document, styles, and scripts, so host-page CSS and JS cannot bleed into the embedded content. [1]

The sandbox attribute lets you strip privileges by default and re-grant only what is needed (allow-scripts, allow-forms), which is why iframes are common for untrusted third-party embeds. [2][3]

Iframes interrupt the host page's layout flow and need their own scrolling and sizing, whereas Shadow DOM content grows naturally with the page. [4]

Eloqra does NOT wrap its widget in an iframe; it renders the [[live-chat-widget]] inside a [[shadow-dom]] so styles stay isolated while the floating [[chat-launcher]] still positions cleanly over the page.

Like an iframe boundary, the [[embed-code]] you paste (a tiny [[javascript-widget]] reading ELOQRA_CHAT_CONFIG) keeps Eloqra's runtime separate from your app's code.

Cross-document messaging between an iframe and its host uses Window.postMessage, since same-origin rules otherwise block direct access. [1]

What an iframe actually is

The `