ElectronNET / ElectronNET/Electron.NET

Prevent opening new windows

Đang mở
#672 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Feature
Ngôn ngữ chính
C#
Star
7.6k
Fork
741
Merge trung bình
3 giờ 50 phút
Pull request đã merge (30 ngày)
2

Mô tả

There is electrons ["new-window"](https://github.com/electron/electron/blob/main/docs/api/web-contents.md#event-new-window-deprecated) event. But i can not call `event.preventDefault()` in C# code (event `browserWindow.OnNewWindowForTab`). How am i be able to prevent opening new windows of my application? (for example when the user middle-mouse-clicks a link)

However, it is marked deprecated in the documentation in favor of [this function on the webContents class](https://github.com/electron/electron/blob/main/docs/api/web-contents.md#contentssetwindowopenhandlerhandler). So how can i access that? There are plenty of methods that are not implemented in Electron.Net.

Related to #434

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.