Star us on GitHub
Star
Welcome to highlight.io
Company
Mission & Values
Compliance & Security
Open Source
Getting Started
Overview
Fullstack Mapping
Backend / Server
Frontend / Client
Fullstack Frameworks
Product Features
Session Replay
Error Monitoring
General Features
Logging
Integrations
Integrations Overview
Amplitude Integration
ClickUp Integration
Discord Integration
Electron Support
Front Integration
Height Integration
Intercom Integration
Linear Integration
Mixpanel Integration
Segment Integration
Slack Integration
Vercel Integration
Tips
Content-Security-Policy
Local Development
Monkey Patches
Performance Impact
Proxying Highlight
Session Search Deep Linking
Troubleshooting
Upgrading Highlight
Highlight.io Changelog
Changelog 12 (02/17)
Menu
Docs / Highlight Docs / Product Features / Session Replay / Cross Origin Iframe Recording

Cross Origin Iframe Recording

Cross-origin iframe support is still in development. If you have any questions or suggestions please reach out to us at support@highlight.io

Cross-origin iframes are <iframe> elements in your app that reference a domain considered to be of a different origin. When your iframe uses a src tag pointing to a different origin, the iframe is not accessible from the parent page. However, the iframe can still emit messages that the parent page can hear.

To support cross-origin iframes, we added functionality into our recording client that allows the iframe to forward its events to the parent session. All you need to do is add the Highlight snippet to both the parent window and the iframe.

Ensure you are using highlight.run 5.2.0 or newer. Then, add the following option to the H.init call inside of your iframe.

import { H } from 'highlight.run' H.init('<YOUR_PROJECT_ID>', { isCrossOriginIframe: true, })
Copy

Ensure that you add the H.init call to both the parent page and the iframe page, but that you only set isCrossOriginIframe in the H.init call of your iframe. Otherwise your sessions will not be recorded.