Maui Blazor 中文社区 QQ群:645660665

让maui的mac app里的webview组件支持调试

在页面代码加入

    public MainPage()
    {
        InitializeComponent();

#if MACCATALYST
        Microsoft.Maui.Handlers.WebViewHandler.Mapper.AppendToMapping("Inspect", (handler, view) =>
        {
            if (OperatingSystem.IsMacCatalystVersionAtLeast(16, 6))
                handler.PlatformView.Inspectable = true;
        });
#endif

    }
posted @ 2024-07-28 21:27  AlexChow  阅读(25)  评论(0编辑  收藏  举报