Skip to content

Comments

Add wry WebView configuration options & DevTools support#27

Open
zaroxh wants to merge 1 commit intokdroidFilter:mainfrom
zaroxh:main
Open

Add wry WebView configuration options & DevTools support#27
zaroxh wants to merge 1 commit intokdroidFilter:mainfrom
zaroxh:main

Conversation

@zaroxh
Copy link

@zaroxh zaroxh commented Feb 24, 2026

Background:
On Windows .msi install for all users (with Compose native distribution), WebView2 fails to start because it tries to create its user data folder in the write-protected program install directory.
Among the other things below, this PR adds an explicit data directory option so apps can point WebView2 to a writable location so it can run on Windows.

Additional changes:

  • Add DevTools support (enable via DesktopWebSettings + open/close)
  • Add Wry configuration options:
    • dataDirectory: Set userdata directory of browser
    • initScript: Set a script that is automatically executed on page load
    • enableClipboard: Enable clipboard access
    • enableDevtools: Enable DevTools feature
    • enableNavigationGestures: Enable trigger of back/forward navigation via gestures
    • incognito: Use incognito mode
    • autoplayWithoutUserInteraction: Allow autoplay of all media without user interaction
    • focused: Focus the WebView when created
  • Update dependencies and Kotlin bindings to match the new Wry capabilities.

- Introduced enhanced WebView creation parameters (background color, data directory, transparency, incognito mode, dev tools, etc.).
- Enabled handling and conversion of RGBA color values in Rust and Kotlin.
- Supported new DevTools APIs to open and close the tools programmatically.
- Updated dependencies to include new Wry features ("devtools").
- Refactored WebView Kotlin bindings to align with expanded configuration capabilities.
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.

1 participant