Skip to content

docs(web): add iframe vs DOM embedding comparison and container CSS styling to embedding-flutter-web #13621

Description

@kevmoo

Summary

The page docs.flutter.dev/platform-integration/web/embedding-flutter-web explains full-page mode, iframe embedding, and multi-view embedded mode (multiViewEnabled), but lacks comparison guidance and DOM container setup rules.

Proposed Additions

  1. iframe vs Direct DOM Embedding Trade-offs: Add a comparison matrix guiding developers on when to choose iframe (security sandbox, isolated JS/CSS context, isolated memory) vs Direct DOM hostElement embedding (shared memory, direct JS interop, seamless styling).
  2. Container CSS Styling Requirements: Document mandatory CSS styling properties (width, height, position: relative, overflow: hidden) required on host DOM elements. Unstyled host elements default to height: auto (0px), causing CustomElementDimensionsProvider to compute view height as 0 and collapse the Flutter view.

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-mediumNecessary but not urgent concern. Resolve when possible.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions