Skip to content

Allow transitions to work within iFrames #3624

Closed
@jacwright

Description

@jacwright

Sometimes your app needs to run within an iframe. For example, Intercom's chat widget which needs to be style-sandboxed from the rest of the page is run in an iFrame. My app wraps a navigation component inside an iFrame for better performance in the rest of the page.

The only thing that can't be worked around in this situation is Svelte's CSS transitions. They add the animation styles to the global (top-level) document and not the component's document.

For Svelte's transitions to work, Svelte will need to support adding styles to the document a component lives in.

I've created a solution which works well and avoids memory leaks. I reference this ticket in the PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions