Skip to content

Commit

Permalink
fix build on iOS and android
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Sep 20, 2024
1 parent 17e80d3 commit f59fafe
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 9 deletions.
52 changes: 52 additions & 0 deletions crates/tauri/permissions/webview/autogenerated/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,32 @@ Default permissions for the plugin.
</tr>


<tr>
<td>

`core:webview:allow-clear-browsing-data `

</td>
<td>

Enables the clear_browsing_data command without any pre-configured scope.

</td>
</tr>

<tr>
<td>

`core:webview:deny-clear-browsing-data `

</td>
<td>

Denies the clear_browsing_data command without any pre-configured scope.

</td>
</tr>

<tr>
<td>

Expand Down Expand Up @@ -45,6 +71,32 @@ Denies the clear_browsing_data command without any pre-configured scope.
<tr>
<td>

`core:webview:allow-clear-webview-data`

</td>
<td>

Enables the clear_webview_data command without any pre-configured scope.

</td>
</tr>

<tr>
<td>

`core:webview:deny-clear-webview-data`

</td>
<td>

Denies the clear_webview_data command without any pre-configured scope.

</td>
</tr>

<tr>
<td>

`core:webview:allow-create-webview`

</td>
Expand Down
18 changes: 9 additions & 9 deletions crates/tauri/src/webview/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,15 +958,6 @@ impl<R: Runtime> Webview<R> {
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
Expand Down Expand Up @@ -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<R: Runtime> Listener<R> for Webview<R> {
Expand Down

0 comments on commit f59fafe

Please sign in to comment.