ElectronNET / ElectronNET/Electron.NET

Prevent opening new windows

オープン
#672 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
Feature
主要言語
C#
スター
7.6k
フォーク
741
平均マージ
3時間 50分
マージ済み PR(30日)
2

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。