From f59fafe265b0d8721f1c7112f051ef0cf2d2248c Mon Sep 17 00:00:00 2001 From: amrbashir Date: Fri, 20 Sep 2024 03:17:26 +0300 Subject: [PATCH] fix build on iOS and android --- .../webview/autogenerated/reference.md | 52 +++++++++++++++++++ crates/tauri/src/webview/mod.rs | 18 +++---- 2 files changed, 61 insertions(+), 9 deletions(-) diff --git a/crates/tauri/permissions/webview/autogenerated/reference.md b/crates/tauri/permissions/webview/autogenerated/reference.md index baf911fd8507..b6aaeaee91b6 100644 --- a/crates/tauri/permissions/webview/autogenerated/reference.md +++ b/crates/tauri/permissions/webview/autogenerated/reference.md @@ -16,6 +16,32 @@ Default permissions for the plugin. + + + +`core:webview:allow-clear-browsing-data ` + + + + +Enables the clear_browsing_data command without any pre-configured scope. + + + + + + + +`core:webview:deny-clear-browsing-data ` + + + + +Denies the clear_browsing_data command without any pre-configured scope. + + + + @@ -45,6 +71,32 @@ Denies the clear_browsing_data command without any pre-configured scope. +`core:webview:allow-clear-webview-data` + + + + +Enables the clear_webview_data command without any pre-configured scope. + + + + + + + +`core:webview:deny-clear-webview-data` + + + + +Denies the clear_webview_data command without any pre-configured scope. + + + + + + + `core:webview:allow-create-webview` diff --git a/crates/tauri/src/webview/mod.rs b/crates/tauri/src/webview/mod.rs index c4737c100cf2..ecc2ccd12e5b 100644 --- a/crates/tauri/src/webview/mod.rs +++ b/crates/tauri/src/webview/mod.rs @@ -958,15 +958,6 @@ impl Webview { Ok(()) } - /// Clear all browsing data for this webview. - pub fn clear_all_browsing_data(&self) -> crate::Result<()> { - self - .webview - .dispatcher - .clear_all_browsing_data() - .map_err(Into::into) - } - /// Sets whether the webview should automatically grow and shrink its size and position when the parent window resizes. pub fn set_auto_resize(&self, auto_resize: bool) -> crate::Result<()> { self @@ -1481,6 +1472,15 @@ tauri::Builder::default() .set_zoom(scale_factor) .map_err(Into::into) } + + /// Clear all browsing data for this webview. + pub fn clear_all_browsing_data(&self) -> crate::Result<()> { + self + .webview + .dispatcher + .clear_all_browsing_data() + .map_err(Into::into) + } } impl Listener for Webview {