How blue-sky-infomation-factory/python-webview2 works
BSIF-Webview2 is a Python framework for building Windows desktop applications with Microsoft WebView2. The main workflow is for application code to start an application and create a window, which hosts browser content and exposes Python methods to JavaScript through synchronous and asynchronous bridge calls. The framework also provides native file and directory pickers. A separate command-line workflow checks for and installs the WebView2 and .NET runtimes. The excerpts show bridge injection and runtime installation; the webview-to-picker relationship is supported only by the source index, so it is marked unverified.
Main entry points: webview.py WebView window · environment.py Environment checks and installers · bridge.py Python bridge handlers · __main__.py Runtime installer command
Components 11
Application and windows
- WebView application
bsif_webview/webview.py - WebView window
bsif_webview/webview.py - WebView2 browser
JavaScript bridge
- Python bridge handlers
bsif_webview/bridge.py - JavaScript bridge
bsif_webview/bridge.js
Native dialogs
- File and directory pickers
bsif_webview/file_system_dialog.py
Runtime setup
- Runtime installer command
bsif_webview_tool/__main__.py - Environment checks and installers
bsif_webview_tool/environment.py
Other components
- Application developer
- WebView2 runtime
- .NET runtime
Connections 11
- Application developer → WebView application: starts
- WebView application → WebView window: creates
bsif_webview/webview.py - WebView window → WebView2 browser: hosts
bsif_webview/webview.py - WebView window → Python bridge handlers: initializes
bsif_webview/webview.py - Python bridge handlers → JavaScript bridge: injects
bsif_webview/bridge.py - WebView2 browser → JavaScript bridge: runs
- WebView window → File and directory pickers: uses
bsif_webview/webview.py - Application developer → Runtime installer command: runs
- Runtime installer command → Environment checks and installers: checks and installs
bsif_webview_tool/__main__.py - Environment checks and installers → WebView2 runtime: checks and installs
bsif_webview_tool/environment.py - Environment checks and installers → .NET runtime: checks and installs
bsif_webview_tool/environment.py