e30034d
(#1009) Fixes Android freezing when handling request due to endless iteration when reading request headers.
e47562f
(#993) Update the unmaintainedkuchiki
crate to the maintainedkuchikiki
crate.7a353c7
(#980) AddWebViewBuilder::with_on_page_load_handler
for providing a callback for handling various page loading events.b0a08b1
(#997) Updatetao
to version0.22
which has removed the global-shortcut, menus and tray features, see tao@v0.22 release.
17e04e2
(#985) MakeWebViewBuilder::with_navigation_handler
apply to AndroidloadUrl
calls.17e04e2
(#985) Add support forWebViewBuilder::with_navigation_handler
on Android.87b331a
(#978) On Windows, avoid resizing the webview when the window gets minimized to avoid unnecessaryresize
event on JS side.17e04e2
(#985) Update tao to 0.21.
-
c09dd7b
(#968) Remove ActionBar handling from wry. If you want to hide the action bar, hide it using thethemes.xml
file in your android project or inheritWryActivity
class and usegetSupportActionBar()?.hide()
in theonCreate
method. -
2b56bfa
(#966) Add support forWebViewBuilder::with_html
andWebViewAttributes.html
on Android. -
d2c1819
(#969) On Linux, replacelinux-header
flag withlinux-body
flag. Request headers are enabled by default. Add request body on custom protocol but it's behind the flag. -
f7dded4
(#955) The bug was reported in tauri repo: tauri-apps/tauri#5986With input method preedit disabled,fcitx can anchor at edit cursor position. the pre-edit text will not disappear,instead it shows in the fcitx selection window below the input area.
-
2b56bfa
(#966) Set base url and origin to null forWebViewBuilder::with_html
andWebViewAttributes.html
for consistency on all platforms.
- On iOS, fix panic at runtime due to setting webview ivar.
- Adjust
cargo:rerun-if-changed
instruction for Android files.
- Fix unresolved reference in kotlin files when building for android.
- Support modifying user agent string on Android.
- On Linux and macOS, add synthesized event for mouse backward and forward buttons.
- Add
Webview::clear_browsing_data
method. - On Android, generate a
proguard-wry.pro
file that could be used to keep the necessary symbols for wry when using minification. - Update
tao
to0.19
- Adds a way to launch a WebView as incognito through a new API at WebViewBuilder named as
with_incognito
. - On macOS and iOS, remove webcontext implementation since we don't actually use it. This also fix segfault if users drop webcontext early.
- Use the new WKWebView
inspectable
property if available (iOS 16.4, macOS 13.3).
- On Android, Add support for native back button navigation.
- Fix
WebView::url
getter on Android. - Add Webview attribute to enable/disable autoplay. Enabled by default.
- Fix the
WebViewBuilder::with_url
when the projet usemimalloc
- Revert
51b49c54
which hid the webview when minimized on Windows.
- On Windows, Linux and macOS, add method
evaluate_script_with_callback
to execute javascipt with a callback. Evaluated result will be serialized into JSON string and pass to the callback. - On iOS, set webview scroll bounce default to NO.
- Update the value returned on a
None
value ofClassDecl::new("WryDownloadDelegate", class!(NSObject))
fromUIViewController
toWryDownloadDelegate
.- 7795356 fix: WryDownloadDelegate call after first time on 2023-02-20
- On Linux, disable system appearance for scrollbars.
- On Windows and Linux, implement
WebviewBuilder::with_back_forward_navigation_gestures
andWebviewAttributes::back_forward_navigation_gestures
to control swipe navigation. Disabled by default.
- Add function to dispatch closure with the Android context.
- On macOS, fix crash when getting dragging position.
- On Android,
wry
can again load assets from the apk'sasset
folder via a custom protocol. This is set byWebViewBuilder
's methodwith_asset_loader
, which is exclusive to Android (by virtue of existing withinWebViewBuilderExtAndroid
). - Update
webview2-com
to0.22
andwindows-rs
to0.44
which bumps the MSRV of this crate on Windows to1.64
.
- Added
WebViewBuilderExtAndroid
trait and withon_webview_created
hook. - Enable dox feature when building docs.
- Expose
wry::webview::prelude::find_class
function to find an Android class in the app project scope. - Added
WebviewExtIOS
trait to access the WKWebView and userContentController references.
- Breaking Change: Bump webkit2gtk to 0.19. This will use webkit2gtk-4.1 as dependency from now on. Also Bump gtk version: 0.15 -> 0.16.
- Breaking Add position of the drop to
FileDropEvent
struct. - On Android, fix the injection of
intialization_scripts
for devServers where theContent-Type
header includes more information than just"text/plain"
.
- Update
tao
to0.16.0
- a27a66b chore: update tao to 0.16.0 on 2023-01-11
- Changed env vars used when building for Android; changed
WRY_ANDROID_REVERSED_DOMAIN
toWRY_ANDROID_PACKAGE
andWRY_ANDROID_APP_NAME_SNAKE_CASE
toWRY_ANDROID_LIBRARY
. - Fixes Android initialization scripts order.
- Remove redundant
.clone()
calls and avoid unnecessary heap allocations. - Change return type of custom protocol handlers from
Result<Response<Vec<u8>>>
toResult<Response<Cow<'static, [u8]>>>
. This allows the handlers to return static resources without heap allocations. This is effective when you embed some large files like bundled JavaScript source as&'static [u8]
usinginclude_bytes!
. - Ensures that the script passed to
.with_initialization_script("here")
is not empty. - Add APIs to process webview document title change.
- Evaluate scripts after the page load starts on Linux and macOS.
- Improve panic error messages on the build script.
- Add
WebViewBuilder::with_url_and_headers
andWebView::load_url_with_headers
to navigate to urls with headers. - Change class declare name from
UIViewController
toWryNavigationDelegate
to avoid class name conflict on iOS. - Rerun build script if the
WRY_ANDROID_KOTLIN_FILES_OUT_DIR
directory changes. - On Windows, Add
WebviewBuilderExtWindows::with_theme
andWebviewExtWindows::set_theme
to change webview2 theme.
- Fixes Android initialization scripts order.
- Improve panic error messages on the build script.
- On macOS, remove all custom keydown implementations. This will bring back keydown regression but should allow all accelerator working.
- Suppress
unused_variables
warning reported only in release build. - Add
WebViewBuilderExtWindows::with_browser_accelerator_keys
method to allow disabling browser-specific accelerator keys enabled in WebView2 by default. Whenfalse
is passed, it disables all accelerator keys that access features specific to a web browser. See the official WebView2 document for more details.
- Fixes usage of the
linux-headers
feature.- 64a72ff fix(wry): correctly use the linux-headers feature on 2022-12-05
- Properly parse the content type header for the
android.webkit.WebResourceResponse
mime type. - Change typo in
WebViewBuilderExtWindows::with_additionl_browser_args
. toWebViewBuilderExtWindows::with_additional_browser_args
. - Add
Webiew::load_url
. - Change the type of
WebViewBuilderExtWindows::with_additional_browser_args
argument fromAsRef<str>
toInto<String>
to reduce extra allocation. - Validate custom protocol response status code on Android.
- [https://github.com/tauri-apps/wry/commit/04422bc1b579d9388ce03c2388b8f415dbc0747b] On macOS, revert content view to native NSView ([#782])(#782)
- Fixes usage of the
linux-headers
feature.- 14c5ae7 fix(wry): correctly use the linux-headers feature on 2022-12-05
- On macOS, fix arrow keys misprint text on textarea.
- On Linux, add
linux-headers
feature flag to fix version regression. The minimum webkit2gtk version remains v2.22.
- On macOS, fix keyinput missing by calling superclass methods.
- On macOS, add an API to enable or disable backward and forward navigation gestures.
- On macOS, pass key event to menu if we have one on key press.
- Fix
WebViewBuilder::with_accept_first_mouse
taking behavior of first initalized webview. - Fix download implementation on macOS older than 11.3.
- On macOS, remove webview from window's NSView before dropping.
- Added
WebViewAttributes::with_accept_first_mouse
method for macOS. - Breaking change Custom protocol now takes
Request
and returnsResponse
types fromhttp
crate. - Enabled devtools in debug mode by default.
- On Desktop, add
download_started_handler
anddownload_completed_handler
. Seeblob_download
anddownload_event
example for their usages. - Fix double permission dialog on macOS 12+ and iOS 15+.
- Focus webview when window starts moving or resizing on Windows to automatically close
<select>
dropdowns. Also notify webview2 whenever the window position/size changes which fixes the<select>
dropdown position - On Windows, hide the webview when the window is minimized to reduce memory and cpu usage.
- Internally return with error from custom protocol if an invalid uri was requseted such as
wry://
which doesn't contain a host. - Support cross compiling ios on a non macos host.
- On Linux, Improve custom protocol with http headers / method added to request, and status code / http headers added to response. This feature is 2.36 only, version below it will fallback to previous implementation.
- On macOS, add WKWebview as subview of existing NSView directly.
- Keypress on non-input element no longer triggers unsupported key feedback sound.
- Remove the IPC script message handler when the WebView is dropped on macOS.
- Breaking change Removed http error variants from
wry::Error
and replaced with genericHttpError
variant that can be used to converthttp
crate errors. - Disabled Microsoft SmartScreen by default on Windows.
- Add
WebView::url
to get the current url. - Breaking change Removed
http
module and replaced with re-export ofhttp
crate. - Add
WebviewBuilderExtWindows::with_additionl_browser_args
method to pass additional browser args to Webview2 On Windows. By default wry passes--disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection
so if you use this method, you also need to disable these components by yourself if you want. - On Windows, fix canonical reason for custom protocol response.
- On macOS, make the webview first responder.
- Implement
<input type="file">
on Android. - Add
WebviewExtAndroid::handle
which can be used to execute some code using JNI context. - Enable JS alert, confirm, prompt on Android.
- Prompt for permissions on Android when needed.
- Implement
webview_version
on Android. - Enable storage, geolocation, media playback,
window.open
. - Improve Android initialization script implementation.
- WRY will now generate the needed kotlin files at build time but you need to set
WRY_ANDROID_REVERSED_DOMAIN
,WRY_ANDROID_APP_NAME_SNAKE_CASE
andWRY_ANDROID_KOTLIN_FILES_OUT_DIR
env vars. - Breaking change Removed
WebView::focus
. - Updated tao to
0.14
- 483bad0 feat: tao as window dependency (#230) on 2021-05-03
- 51430e9 publish new versions (#221) on 2021-05-09
- 0cf0089 Update tao to v0.2.6 (#271) on 2021-05-18
- a76206c publish new versions (#272) on 2021-05-18
- 3c4f8b8 Update tao to v0.5 (#365) on 2021-08-09
- 44aa1dc publish new versions (#351) on 2021-08-09
- 935cc5f Update tao to 0.13 (#642) on 2022-07-27
- 657888a Publish New Versions (#632) on 2022-07-27
- 3a91376 chore(deps): update tao to 0.14 (#691) on 2022-09-13
- Allow setting the webview background color.
- Added the
RustWebView
class on Android. - Update the
windows
crate to the latest 0.39.0 release andwebview2-com
to 0.19.1 to match. - On Windows, automatically focus the webview when the window gains focus to match other platforms.
- Implement custom protocol on Android.
- Implement
WebView::eval
on Android. - On iOS, add webview as subview instead of replacing original view.
- Move WebView logic from tao to wry.
- Add android support
- Enable private picture-in-picture on macos.
- On macOS, fix devtool warning
- 2eba8c9 fix: devtool warning by adding parent view
- Add
WebViewBuilder::with_clipboard
. - Fix typos in several files.
- Set webview2 language to match the OS language. This makes i18n functions like
new Date().toLocaleStrin()
behave correctly. - Update tao to 0.13.0.
-
- Automatically resize the webview on Windows to align with other platforms.
- Breaking change: Removed
WebView::resize
- d7c9097 feat: auto resize webview on Windows (#628) on 2022-06-27
- Implement new window requested handler
- Re-export
url::Url
. - Update tao to 0.12
- Remove unused tray from doc features.
- Add option to enable/disable zoom shortcuts for WebView2, disabled by default.
- Prevent memory leak on macOS.
- Update the
windows
crate to the latest 0.37.0 release andwebview2-com
to 0.16.0 to match.
The #[implement]
macro in windows-implement
and the implement
feature in windows
depend on some const
generic features which stabilized in rustc
1.61. The MSRV on Windows targets is effectively 1.61, but other targets do not require these features.
The webview2-com
crate specifies rust-version = "1.61"
, so wry
will inherit that MSRV and developers on Windows should get a clear error message telling them to update their toolchain when building wry
or anything that depends on wry
. Developers targeting other platforms should be able to continue using whatever toolchain they were using before.
- Fixes a crash on macOS below Big Sur due to
titlebarSeparatorStyle
(11+ API) usage.- eb2dddb fix(macos): only use APIs when supported on 2022-05-08
- Only run
WebView::print
on macOS on v11+. This prevents a crash on older versions.- eb2dddb fix(macos): only use APIs when supported on 2022-05-08
- Fixes a typo in the
WebviewExtMacOS
conditional compilation. - Fixes a crash when the custom protocol response is empty on macOS.
- Add
WebView::zoom
method. - Set the titlebar separator style in macOS to
none
. - Disable webview2 mini menu
- Update how android handles url
- Add devtools support on Android/iOS.
- Fix to reset process on MacOS when webview is closed, closes #536.
- On Windows and Linux, disable resizing maximized borderless windows.
- Fixes a memory leak on the custom protocol response body on macOS.
- Update tao to v0.8.0.
- The
tray
andayatana-tray
Cargo features are not enabled by default. - Breaking change: Renamed the
ayatana
Cargo feature toayatana-tray
and added thegtk-tray
feature. The default tray on Linux is nowlibayatana-appindicator
.
- Added
close_devtools
function toWebview
. - Hide the devtool functions behind the
any(debug_assertions, feature = "devtools")
flag. - Breaking change: Renamed the
devtool
function toopen_devtools
. - Enable tab navigation on macOS.
- Added
is_devtools_open
function toWebview
. -
- Expose methods to access the underlying native handles of the webview.
- Breaking change:
WebviewExtWindows::controller
now returns the controller directly and not wrapped in anOption
- e54afec feat: expose webview native handles, closes #495 (#513) on 2022-03-03
- Add navigation handler to decide if an url is allowed to navigate.
- Breaking change: Renamed the
devtool
feature todevtools
. - Breaking change: Renamed the
with_dev_tool
function towith_devtools
.
- Fix rustdoc generation of Windows and Mac on docs.rs.
- Fix cross compilation from
macOS
. - Update
webview2-com
to 0.13.0, which bumps the WebView2 SDK to 1.0.1108.44 and improves cross-compilation support.
Targeting *-pc-windows-gnu works now, but it has some limitations.
- 24a443c Add /.changes/webview2-com-0.13.0.md on 2022-02-14
-
Add
devtool
feature flag and configuration option. -
Update the
webview2-com
crate 0.11.0: -
Fix silent build script errors related to unconfigured nuget in wravery/webview2-rs#4
-
Update the WebView2 SDK (not the runtime, just the API bindings) to the latest 1.0.1072.54 version
- Update gtk to 0.15
- Add clipboard field in WebViewAttributes.
- Ignore transparency on Windows 7 to prevent application crash.
- Remove clipboard property for consistency across platforms.
- Enable cookie persistence on Linux if the
data_directory
is provided. - Enable objc's exception features so they can be treated as panic message.
- Add inner size method for webview. This can reflect correct size of webview on macOS.
- Add "transparent" and "fullscreen" feature flags on macOS to toggle private API.
- Implement WebContextImpl on mac to extend several callback lifetimes.
- The only thing that private mod shared does is re-export http mod to public, we can just pub mod http.
-
- Fix hovering over an edge of undecorated window on Linux won't change cursor.
- Undecorated window can be resized using touch on Linux.
- 219d20c Merge next back to dev branch (#477) on 2022-02-05
- Update webkit2gtk to 0.15
- Add
with_user_agent(&str)
toWebViewBuilder
. - Replace all of the
winapi
crate references with thewindows
crate, and replacewebview2
andwebview2-sys
withwebview2-com
andwebview2-com-sys
built with thewindows
crate. The replacement bindings are in thewebview2-com-sys
crate, withpub use
in thewebview2-com
crate. They can be shared with TAO. - Fix null pointer crash on
get_content
of web resource request. This is a temporary fix. We will switch it back once upstream is updated. - Update the
windows
crate to 0.25.0, which comes with pre-built libraries. WRY and Tao can both reference the same types directly from thewindows
crate instead of sharing bindings inwebview2-com-sys
. - Update the
windows
crate to 0.29.0 andwebview2-com
to 0.9.0. - Update the
windows
crate to 0.30.0 andwebview2-com
to 0.10.0.
-
Fixed a Linux multi-window issue where the internal url loader didn't unlock when flushed while empty
-
The custom protocol now returns a
Request
and expects aResponse
. -
This allows us to get the complete request from the Webview. (Method, GET, POST, PUT etc..) Read the complete header.
-
And allow us to be more flexible in the future without bringing breaking changes.
-
d202573 refactor: Custom protocol request/response (#387) on 2021-08-22
-
On Linux, automation callbacks now use the first created webview as the return value
- Add html attributes as another method to load the page. This can provide some other origin header and make CORS request possible.
- Shorter protocol name on Windows. This can make origin be shorter too.
- Custom Protocol handlers no longer take a
&Window
parameter. - Update gtk to version 0.14. This also remove requirement of
clang
. - Update tao to v0.5. Please see release notes on tao for more information.
- Add flags to support all other possible unix systems.
- Support having multiple webkit2gtk
WebView
s on a singleWebContext
. - On Windows, Fix cursor flickering when Tao window is without decorations
- Remove winrt support since it's outdated for a long time. We will reimplement it again once
windws-rs
is stable!
- Allow resizing of borderless window on Windows
- Mark enums as
#[non_exhaustive]
to prevent breaking changes on enum update. - Bump tao to
0.4
. Please refer totao
changelog for more details. -
- Add
focus
method toWebview
- Add
- Add
WebviewExtWindows
trait withcontroller
method - 621ed1f feat: add
.focus()
toWebview
(#325) on 2021-07-05 - 96b7b94 Add controller method instead (#326) on 2021-07-07
- macOS: Remove handler in the webview as it should be handled with the menu.
- Fixes multiple custom protocols registration on Windows.
- #315 fixed Webview2 runtime performance issues.
- Fix file explorer getting blocked by automation.
WebContext::set_allows_automation
is now available to specify if the context should allow automation (e.g. WebDriver). It is only enforced on Linux, but may expand platforms in the future.
- Add WebViewAttributes
- Add
with_web_context
method that can work well with builder pattern. - Change the custom protocol handler on macOS so it returns a response on error and a status code on success.
- Update signature of custom protocol closure. It should return a mime type string now.
- Fix webview creation when using new_any_thread of event loop.
- Remove
Dispatcher
,dispatch_script
anddispatcher
in thewebview
module and add ajs
parameter toevaluate_script
. - Removes the
image
dependency. - Bump tao to
0.3
and add more examples.
For more details, please refer to tao
changelog.
- cd4697e bump
tao
to 0.3 with examples (#294) on 2021-06-21 - Add
wry::webview::WebContext
. It's now a required argument onWebViewBuilder::build
.
- Update tao to v0.2.6
- Expose
webview_version
function in thewebview
module. - Add print method on Linux and Windows.
- Disable smooth scrolling on Linux to match behaviour on browsers.
- Correctly set visibility when building
Window
on gtk-backend - Fix
macOS
cursors and other minors UI glitch. - Expose
print()
function to the webview. Work only on macOS for now. - Fix macOS windows order for tray (statusbar) applications.
- Add
request_redraw
method ofWindow
on Linux - Add tao as window dependency.
- Close the window when the instance is dropped on Linux and Windows.
- Remove winit dependency on Linux
- Refactor signatures of most closure types
- Drop handler closures properly on macOS.
- Fix
history.pushState
in webview2. - The
data_directory
field now affects the IndexedDB and LocalStorage directories on Linux. - Fix runtime panic on macOS, when no file handler are defined.
- Add position field on WindowAttribute
- Fix panic on multiple custom protocols registration.
- Fix SVG render with the custom protocol.
- Initial custom WindowExtWindows trait.
- Fix transparency on Windows
- Add platform module and WindowExtUnix trait on Linux
- Make sure custom protocol on Windows is over HTTPS.
- Initial winit interface for gtk backend
- Wry now accepts multiple custom protocol registrations.
- Apply license header for SPDX compliance.
- Remove bindings crate and use windows-webview2 as dependency instead.
- Add old win32 implementation on windows as default feature flag.
- Adds a
WindowProxy
to the file drop handler closure -WindowFileDropHandler
.
- Add pipe back to version check for covector config. This prevents the CI failure on publish if it exists already. The issue was patched in covector (and tests in place so it doesn't break in the future).
- Fix messages to the webview from the backend being delayed on Linux/GTK when the user is not actively engaged with the UI.
- Add draggable regions, just add
drag-region
class to the html element. - Add event listener in application proxy
- Better result error handling
- Fix visibility on webview2 when window was invisible previously and then shown.
- Add attribute option to allow WebView on Windows use user_data folder
- Initialize covector!
- Support Windows 7, 8, and 10
- Dev tools are enabled on debug build
- Add skip task bar option
- Add custom protocol option
- Add transparent option to mac and linux
- Error type has Send/Sync traits
- 3536b83 Add .changes file in prepare of v0.6 on 2021-02-24
- Replace Callback with RPC handler
- Add File drop handlers