Skip to content

Add wry WebView configuration options & DevTools support#27

Merged
kdroidFilter merged 1 commit intokdroidFilter:mainfrom
zaroxh:main
Feb 26, 2026
Merged

Add wry WebView configuration options & DevTools support#27
kdroidFilter merged 1 commit intokdroidFilter:mainfrom
zaroxh:main

Conversation

@zaroxh
Copy link
Contributor

@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.
@Sterta
Copy link
Contributor

Sterta commented Feb 26, 2026

Really nice work @zaroxh, @kdroidFilter could you please have a look.

@kdroidFilter kdroidFilter merged commit 92c228b into kdroidFilter:main Feb 26, 2026
4 checks passed
@kdroidFilter
Copy link
Owner

Hi, awesome ! Thanks a lot !

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.

3 participants