Option 2 · Iframe streaming

A LiveView chat in an iframe

The chat UI is rendered by Omnimas. The client adds one <iframe> and a short resize listener. The widget's CSS lives inside the frame, so a messy theme can never break it.

Live preview

The frame auto-resizes from postMessage height events.

https://omnimas.jadranpro.ai/embed/chat?host=omnichat.jadranpro.ai&mode=streaming&widget_key=omni_wk_live_8XWm7ogDX4NHk76TI1yFy3FHY03VRB_kERblkGmboaA

Paste this snippet

Replace PASTE_RAW_WIDGET_KEY and your-site.example with the site's key and domain.

<iframe
  id="omnimas-assistant"
  src="https://omnimas.jadranpro.ai/embed/chat?widget_key=PASTE_RAW_WIDGET_KEY&host=your-site.example&mode=streaming"
  title="Website Assistant"
  style="border:0; width:100%; height:480px;"
  loading="lazy"></iframe>

<script>
(() => {
  const frame = document.getElementById("omnimas-assistant");
  const expectedOrigin = new URL(frame.src).origin;
  window.addEventListener("message", (event) => {
    if (event.origin !== expectedOrigin) return;

    const data = event.data || {};
    if (data.type === "omnimas:resize" && Number.isFinite(data.height)) {
      frame.style.height = Math.max(320, data.height) + "px";
    }
  });
})();
</script>

Why pick this

  • Zero custom JS UI — Omnimas owns the chat interface in LiveView.
  • CSS isolation — the frame shields the widget from the host theme.
  • Native streaming — LiveView diffs stream token updates over the iframe's own socket, same-origin to Omnimas.
  • Only the host parameter and the verified-domain check authorize the session.