@dynamic-labs/iframe-setup
package enables the Dynamic SDK to work within iframe environments by establishing communication channels between the parent page and the iframe.
initial-parent-url
query parameter:
setupIframe
function in the parent page sets up several event handlers:
setupInsideIframe
function initializes the necessary platform services to communicate with the parent page.
This bidirectional communication ensures that:
setupIframe
functionality by copying the code from the package source.
initial-parent-url
parameter is correctly setallow-scripts allow-same-origin allow-modals
connect-src
directive