You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Registers a URI scheme protocol available to all webviews.
419
+
/// Leverages [setURLSchemeHandler](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/2875766-seturlschemehandler) on macOS,
420
+
/// [AddWebResourceRequestedFilter](https://docs.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.addwebresourcerequestedfilter?view=webview2-dotnet-1.0.774.44) on Windows
421
+
/// and [webkit-web-context-register-uri-scheme](https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebContext.html#webkit-web-context-register-uri-scheme) on Linux.
422
+
///
423
+
/// # Known limitations
424
+
///
425
+
/// URI scheme protocols are registered when the webview is created. Due to this limitation, if the plugin is registed after a webview has been created, this protocol won't be available.
426
+
///
427
+
/// # Arguments
428
+
///
429
+
/// * `uri_scheme` The URI scheme to register, such as `example`.
430
+
/// * `protocol` the protocol associated with the given URI scheme. It's a function that takes an URL such as `example://localhost/asset.css`.
431
+
///
432
+
/// # Examples
433
+
///
434
+
/// ```rust
435
+
/// use tauri::{plugin::{Builder, TauriPlugin}, Runtime};
0 commit comments