.NET MAUI Blazor Hybrid how to intercept open in new tab
Andrew Denha
1
Reputation point
I use await JSRuntime.InvokeAsync<object>("open", path, "_blank");
in the .razor pages, how I can intercept this and open:
- new tab in browse
- new page in the windows platform
- same page in the android/ios platform
Or how I can create events from my Components(.razor pages) project
to the MAUI and Web projects
I`m try to use in my MainLayout.razor(RazorPages project):
[Parameter]
public EventCallback<string> OpenNewWindowByUrl { get; set; }
But I do not understand how to subscribe to this event from MainPage.xaml(MAUI project) BlazorWebView or _Layout.cshtml
Sign in to answer