ElectronNET / ElectronNET/Electron.NET

Prevent opening new windows

Abierto
#672 1 comentario 0 reacciones 0 asignados Ver en GitHub
Feature
Lenguaje dominante
C#
Estrellas
7.6k
Forks
741
Merge medio
3 h 50 min
PR fusionados (30 d)
2

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.