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
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).
- 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.
Summary
The page
docs.flutter.dev/platform-integration/web/embedding-flutter-webexplains full-page mode,iframeembedding, and multi-view embedded mode (multiViewEnabled), but lacks comparison guidance and DOM container setup rules.Proposed Additions
iframevs Direct DOM Embedding Trade-offs: Add a comparison matrix guiding developers on when to chooseiframe(security sandbox, isolated JS/CSS context, isolated memory) vs Direct DOMhostElementembedding (shared memory, direct JS interop, seamless styling).width,height,position: relative,overflow: hidden) required on host DOM elements. Unstyled host elements default toheight: auto(0px), causingCustomElementDimensionsProviderto compute view height as 0 and collapse the Flutter view.