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
Sandboxing and isolation
Why Eloqra uses Shadow DOM instead
Sources & References
Last updated: June 25, 2026
Related Terms
Shadow DOM
Shadow DOM is a browser API that attaches a hidden, self-contained DOM subtree to an element, with its own scoped styles that neither leak out to the host page nor get overwritten by it. [1] Eloqra renders its entire chat widget inside a shadow root so the host site's CSS can never break the widget, and the widget's CSS can never alter the host site.
JavaScript Widget
A JavaScript widget is a self-contained chunk of front-end code, loaded from a single script tag, that injects an interactive UI into any third-party web page. In Eloqra it is the live-chat widget that boots from one snippet and renders the chat launcher and conversation panel directly on a customer's site.
Embed Code
An embed code is a short snippet of HTML or JavaScript a website owner pastes into their pages so a third-party tool loads and runs on their site. For Eloqra it is a two-line script snippet that sets a project configuration and loads the chat script, which then injects the live-chat widget.
Live Chat Widget
A live chat widget is the embeddable, in-browser chat interface a website loads from a small script so visitors can message a business in real time without leaving the page. In Eloqra it is a floating launcher and chat panel that boots from a single <script> tag and renders inside a Shadow DOM.
Chat Launcher
A chat launcher is the small floating button — usually a speech-bubble icon pinned to a bottom corner of the page — that a visitor clicks to open a live-chat window. It is the persistent, always-visible entry point to the chat experience.
HTTP Polling
HTTP polling is a real-time technique where the client repeatedly sends HTTP requests on a fixed interval to ask the server whether new data is available, instead of holding a persistent connection. Eloqra's chat widget uses short polling roughly every 4-5 seconds to fetch new messages and typing state.
More in Widget, Integration & Privacy
Collect testimonials that build trust
Eloqra gives you a lightweight live chat widget that routes every visitor message to your Telegram — free while in early access.
Get Started FreeMore in Widget, Integration & Privacy
View all in Widget, Integration & Privacy →Categories
Learn More
Guides on collecting testimonials, building trust, and turning customer feedback into social proof.
Read the blog →