Repository navigation
Poly v0.2.9 - Browser Mode & WebView Event API
New Features
-
Browser Mode: New
poly browsercommand for building browser-like applications with custom UI- Separate UI and content WebViews with proper z-order handling on Windows
- Custom UI HTML support via
--ui-htmlflag - Configurable UI height with
--ui-height - IPC communication between UI and content WebViews
-
WebView Event API: Real-time feedback from content WebView to UI
onNavStart(url)- Called when navigation startsonLoadEnd(url)- Called when page finishes loadingonTitleChange(title)- Called when page title changes- Window title automatically updates with page title
Fixes
- Fixed WebView z-order issue on Windows/WebView2 where content WebView would cover UI
- Fixed initial WebView bounds not being applied correctly (required resize to show)
- Fixed lock handling in WebView operations with proper error handling instead of unwrap()
- Removed auto-resize in native.rs that was overwriting setMainBounds calls
Improvements
- Content WebView now created first (bottom layer), UI WebView second (top layer) for correct stacking
- Added explicit initial bounds setting after WebView creation
- Navigation and title change events now properly propagated from content to UI WebView
- Updated API documentation with complete Browser Mode section
- Updated README with Browser Mode examples and WebView API overview
Example Usage
poly browser https://google.com --ui-html browser-ui.html
poly browser https://example.com --width 1400 --height 900 --ui-html ui.html