Skip to content

Commit

Permalink
Fix launcher on browser (#16271)
Browse files Browse the repository at this point in the history
* Fix browser launcher impl

* Use globalThis just in case
#Conflicts:
#	src/Browser/Avalonia.Browser/Interop/NavigationHelper.cs
  • Loading branch information
maxkatz6 committed Aug 12, 2024
1 parent 420f466 commit d231781
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Browser/Avalonia.Browser/BrowserTopLevelImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ public void SetFrameThemeVariant(PlatformThemeVariant themeVariant)
return _inputPane;
}

if (featureType == typeof(ILauncher))
{
return new BrowserLauncher();
}

return null;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Browser/Avalonia.Browser/Interop/NavigationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ internal static partial class NavigationHelper
[JSImport("NavigationHelper.addBackHandler", AvaloniaModule.MainModuleName)]
public static partial void AddBackHandler([JSMarshalAs<JSType.Function<JSType.Boolean>>] Func<bool> backHandlerCallback);

[JSImport("window.open")]
[JSImport("globalThis.open")]
public static partial JSObject? WindowOpen(string uri, string target);
}

0 comments on commit d231781

Please sign in to comment.