feat: add WebviewBuilder::on_new_window and WebviewBuilder::on_document_title_changed (#13876)

* add "new window" and "document title changed" webview handler

* take document title changed handler

* update example, add missing api, change files

* allow creating tauri window for the window.open call

* set size and position, fix linux, example

* enhance document title change

* fix windows deadlock

* wry 0.53

* update wry

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
THELOSTSOUL
2025-08-17 01:49:01 +08:00
committed by GitHub
parent f1232671ab
commit 33d0b3f0c1
12 changed files with 653 additions and 22 deletions

16
Cargo.lock generated
View File

@@ -1319,7 +1319,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [
"lazy_static",
"windows-sys 0.48.0",
"windows-sys 0.59.0",
]
[[package]]
@@ -4311,7 +4311,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
dependencies = [
"cfg-if",
"windows-targets 0.48.5",
"windows-targets 0.52.6",
]
[[package]]
@@ -5816,7 +5816,7 @@ dependencies = [
"aes-gcm",
"aes-kw",
"argon2",
"base64 0.21.7",
"base64 0.22.1",
"bitfield",
"block-padding",
"blowfish",
@@ -8857,12 +8857,15 @@ dependencies = [
"jni 0.21.1",
"objc2 0.6.0",
"objc2-ui-kit",
"objc2-web-kit",
"raw-window-handle",
"serde",
"serde_json",
"tauri-utils",
"thiserror 2.0.12",
"url",
"webkit2gtk",
"webview2-com",
"windows 0.61.1",
]
@@ -10307,7 +10310,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"windows-sys 0.48.0",
"windows-sys 0.59.0",
]
[[package]]
@@ -10939,14 +10942,15 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
[[package]]
name = "wry"
version = "0.52.1"
version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12a714d9ba7075aae04a6e50229d6109e3d584774b99a6a8c60de1698ca111b9"
checksum = "5698e50a589268aec06d2219f48b143222f7b5ad9aa690118b8dce0a8dcac574"
dependencies = [
"base64 0.22.1",
"block2 0.6.0",
"cookie",
"crossbeam-channel",
"dirs 6.0.0",
"dpi",
"dunce",
"gdkx11",