feat(opener): add inAppBrowser option for iOS and Android (#2803)

This commit is contained in:
Lucas Fernandes Nogueira
2025-06-24 16:43:01 -03:00
committed by GitHub
parent 9799f0dbab
commit 2aec8ff4c4
8 changed files with 69 additions and 18 deletions
+3 -1
View File
@@ -35,12 +35,14 @@ import { invoke } from '@tauri-apps/api/core'
*
* @param url The URL to open.
* @param openWith The app to open the URL with. If not specified, defaults to the system default application for the specified url type.
* On mobile, `openWith` can be provided as `inAppBrowser` to open the URL in an in-app browser. Otherwise, it will open the URL in the system default browser.
*
* @since 2.0.0
*/
export async function openUrl(
url: string | URL,
openWith?: string
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
openWith?: 'inAppBrowser' | string
): Promise<void> {
await invoke('plugin:opener|open_url', {
url,