mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-22 21:30:44 +02:00
feat(opener): add inAppBrowser option for iOS and Android (#2803)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user