Skip to content

add cross-platform WebView control backed by webview_all - #6836

Open
zaim-tech wants to merge 3 commits into
flet-dev:mainfrom
zaim-tech:main
Open

add cross-platform WebView control backed by webview_all#6836
zaim-tech wants to merge 3 commits into
flet-dev:mainfrom
zaim-tech:main

Conversation

@zaim-tech

@zaim-tech zaim-tech commented Sep 11, 2026

Copy link
Copy Markdown

Description

Adds a new cross-platform WebView control backed by webview_all.

It supports:

  • Windows through webview_windows
  • Linux through webview_cef
  • iOS and macOS through native WebView implementations
  • Android through the native WebView implementation
  • Web through webview_flutter_web

This extends Flet's current WebView support with Windows and Linux support.

The extension is already published independently as flet-webview-all on PyPI. This PR integrates it into Flet as a built-in extension.

Testing status:

  • ✅ Windows (desktop) — built and verified locally
  • ✅ Web — built and verified locally (flet build web, production build), WebView renders and loads content correctly
  • ⚠️ macOS / Linux — not manually tested locally; CI in this PR has not run yet, so platform support here is based on webview_all's existing implementation rather than verified results.

Known limitation: On Web, loading cross-origin content that doesn't send a Cross-Origin-Resource-Policy header can be blocked when served with COEP require-corp (required for WASM builds with threading). This is a constraint of webview_all's Web implementation (iframe-based), not specific to this integration — native platforms are unaffected.

Note on base branch: No active release/v{version} branch was found at the time of opening this PR, so this targets main directly per the current repo state.

Fixes #6530

Test code

import flet as ft
import flet_webview_all as fwa

def main(page: ft.Page):
    page.title = "flet-webview-all"

    page.add(
        fwa.FletWebviewAll(
            url="https://flet.dev",
            expand=True
        )
    )

ft.run(main)

Type of change

  • New feature
  • Bug fix
  • Breaking change
  • Documentation update

Checklist

  • I signed the CLA.
  • I have performed a self-review of my own code.
  • My code follows the style guidelines of this project.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings.
  • New and existing tests pass locally with my changes.
  • I have made corresponding documentation changes, if applicable.
  • I have added changelog entries for user-facing changes, if applicable.
  • I have updated release guide pages and website/sidebars.yml for breaking changes, removals, and deprecations, if applicable.

Screenshots

image

Additional details

First-time contributor to Flet core — open to feedback on API naming/conventions for built-in extensions.

Current package exposes the control as flet_webview_all.FletWebviewAll (separate import). Open to renaming/restructuring to ft.WebView(...) or another convention if that better matches Flet's built-in extension naming.

I currently maintain the flet-webview-all GitHub repo and PyPI package independently. If this is accepted as a built-in extension, I'm happy to transfer the repo to the flet-dev org and/or the PyPI package (or add flet-dev as a co-maintainer) — whichever integration pattern (monorepo package vs. standalone flet-dev repo) the team prefers.

Summary by Sourcery

Integrate the cross-platform flet-webview-all extension into Flet as a built-in WebView control.

New Features:

  • Add the flet-webview-all extension with a cross-platform FletWebviewAll control for displaying and interacting with web content on Windows, macOS, Linux, iOS, Android, and Web.
  • Expose typed WebView events and asynchronous controls for navigation, JavaScript execution, scrolling, caching, cookies, and developer tools.

Enhancements:

  • Integrate the WebView extension into Flet's client, Python workspace, build examples, and extension registration.

Build:

  • Include flet-webview-all in build dependencies and package publishing validation.

CI:

  • Add the extension to CI dependency and publication checks.

Documentation:

  • Add user-facing WebViewAll documentation, API reference pages, and an example application.
  • Record the new extension in the changelogs.

Tests:

  • Add an integration test covering WebViewAll HTML rendering.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: Replace Webview with Webview_all with Windows and Linux support.

1 participant