Repository: tauri-apps/wry (language: rust)

Issue:
`.with_user_agent()` not working in 0.46
**Describe the bug**
After upgrading to 0.46 `.with_user_agent` stop working

**Steps To Reproduce**

v0.45 -> working
```rust
        let webview = WebViewBuilder::new(&window)
            .with_user_agent(USER_AGENT)
            .build()?;
```

v0.46 -> not working
```rust
        let webview = WebViewBuilder::new()
            .with_user_agent(USER_AGENT)
            .build(&window)?;
```

**Expected behavior**

Sets user agent correctly.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Platform and Versions (please complete the following information):**
OS: OSX  15.0.1
Rustc:  1.80.1 (3f5fd8dd4 2024-08-06)

**Additional context**
Add any other context about the problem here.




Discussion / hints:

Fix patch:
diff --git a/.changes/fix-user-agent-regression.md b/.changes/fix-user-agent-regression.md
new file mode 100644
index 000000000..9db873629
--- /dev/null
+++ b/.changes/fix-user-agent-regression.md
@@ -0,0 +1,5 @@
+---
+"wry": patch
+---
+
+Fix `with_user_agent` regression.
diff --git a/src/lib.rs b/src/lib.rs
index 86f2732f1..bf257c662 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -907,7 +907,7 @@ impl<'a> WebViewBuilder<'a> {
   /// see https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/archive?tabs=dotnetcsharp#10790-prerelease
   pub fn with_user_agent(self, user_agent: impl Into<String>) -> Self {
     self.and_then(|mut b| {
-      b.attrs.html = Some(user_agent.into());
+      b.attrs.user_agent = Some(user_agent.into());
       Ok(b)
     })
   }


Test patch: