ElectronNET / ElectronNET/Electron.NET
Prevent opening new windows
- 主要語言
- C#
- 星號
- 7.6k
- 分支
- 741
- 平均合併
- 3 小時 50 分鐘
- 30 天內合併 PR
- 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
貢獻指南
研究方向
Start with Electron.NET's BrowserWindow.OnNewWindowForTab event and compare its binding with Electron's webContents.setWindowOpenHandler documentation linked in the issue. Review related issue #434 and existing webContents method bindings; done means an Electron.NET application can prevent new windows, including those opened by middle-clicking a link.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp, electron
- 領域
- desktop
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100