Skip to content

Poly v0.2.9 - Browser Mode & WebView Event API

Choose a tag to compare

@OpenChatGit OpenChatGit released this 01 Jan 06:26
· 12 commits to master since this release

New Features

  • Browser Mode: New poly browser command 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-html flag
    • 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 starts
    • onLoadEnd(url) - Called when page finishes loading
    • onTitleChange(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