Skip to content

Custom CSS and JavaScript (iframe only)

HolderChat user guide

Documentation

Summary

In Widget Appearance you can add custom CSS and JavaScript that apply only inside the iframe embed. They never run on the script embed, on the host page, in the HolderChat dashboard, or on other bots. Each field is limited to 50,000 characters.

Why this is iframe-only

If custom JavaScript ran in the script embed, it would execute on your visitors’ page and could read that page. HolderChat therefore does not offer custom JS on the script path.

The iframe embed loads the widget in a sandboxed frame without allow-same-origin. The document gets an opaque origin. Your CSS and JavaScript can change the look and behaviour of the chat inside that frame, but they cannot read the parent document and cannot read holderchat.com cookies or a logged-in dashboard session.

How to add it

  1. Open Dashboard, edit the bot, and go to Widget Appearance
  2. Copy the Iframe snippet and add it to your site (see Embedding the chatbot widget)
  3. Enter CSS and/or JavaScript in the custom fields
  4. Click Save appearance
  5. Reload a page that uses the iframe snippet. The live preview in the dashboard is also sandboxed in the same way, so it cannot access the dashboard

If a page uses the script embed instead, these fields have no effect.

Limits and warnings

  • Maximum 50,000 characters per field
  • Only an admin of that bot can edit the fields
  • Do not put secrets, API keys, or passwords here — the iframe is visible to visitors and the bot token is already in the public snippet
  • CSS and JavaScript are stored as text with a length limit and with tag-breakout characters neutralised. This is not a CSS or JavaScript linter
  • Custom code can still change the chat UI inside the frame or call public endpoints. Keep it modest

Related topics