mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-02-06 13:57:16 +00:00
fix(tauri-driver): Parse ms:edgeOptions separately (#12383)
Co-authored-by: Fabian-Lars <github@fabianlars.de>
This commit is contained in:
parent
46c7b16111
commit
fb294af8e3
5
.changes/change-pr-12383.md
Normal file
5
.changes/change-pr-12383.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-driver": "patch:bug"
|
||||
---
|
||||
|
||||
Parse ms:edgeOptions separately to prevent `invalid argument` errors.
|
||||
@ -50,13 +50,18 @@ impl TauriOptions {
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
fn into_native_object(self) -> Map<String, Value> {
|
||||
let mut ms_edge_options = Map::new();
|
||||
ms_edge_options.insert("binary".into(), json!(self.application));
|
||||
ms_edge_options.insert("args".into(), self.args.into());
|
||||
|
||||
if let Some(webview_options) = self.webview_options {
|
||||
ms_edge_options.insert("webviewOptions".into(), webview_options);
|
||||
}
|
||||
|
||||
let mut map = Map::new();
|
||||
map.insert("ms:edgeChromium".into(), json!(true));
|
||||
map.insert("browserName".into(), json!("webview2"));
|
||||
map.insert(
|
||||
"ms:edgeOptions".into(),
|
||||
json!({"binary": self.application, "args": self.args, "webviewOptions": self.webview_options}),
|
||||
);
|
||||
map.insert("ms:edgeOptions".into(), ms_edge_options.into());
|
||||
map
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user