|
@@ -1,4 +1,4 @@
|
|
-// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
|
|
|
|
|
+// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
// SPDX-License-Identifier: MIT
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
@@ -20,10 +20,14 @@ type HttpClient = Client<hyper::client::HttpConnector>;
|
|
const TAURI_OPTIONS: &str = "tauri:options";
|
|
const TAURI_OPTIONS: &str = "tauri:options";
|
|
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
#[derive(Debug, Deserialize)]
|
|
|
|
+#[serde(rename_all = "camelCase")]
|
|
struct TauriOptions {
|
|
struct TauriOptions {
|
|
application: PathBuf,
|
|
application: PathBuf,
|
|
#[serde(default)]
|
|
#[serde(default)]
|
|
args: Vec<String>,
|
|
args: Vec<String>,
|
|
|
|
+ #[cfg(target_os = "windows")]
|
|
|
|
+ #[serde(default)]
|
|
|
|
+ webview_options: Option<Value>,
|
|
}
|
|
}
|
|
|
|
|
|
impl TauriOptions {
|
|
impl TauriOptions {
|
|
@@ -44,7 +48,7 @@ impl TauriOptions {
|
|
map.insert("browserName".into(), json!("webview2"));
|
|
map.insert("browserName".into(), json!("webview2"));
|
|
map.insert(
|
|
map.insert(
|
|
"ms:edgeOptions".into(),
|
|
"ms:edgeOptions".into(),
|
|
- json!({"binary": self.application, "args": self.args}),
|
|
|
|
|
|
+ json!({"binary": self.application, "args": self.args, "webviewOptions": self.webview_options}),
|
|
);
|
|
);
|
|
map
|
|
map
|
|
}
|
|
}
|