You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Knowing whether the user initiated the new-window event is important for blocking unwanted popups in a webview. Without it, an untrusted page can call window.open() or anchorTag.click() to trigger popups at will.
In webContents.executeJavascript, we have a userGesture parameter which overrides the flag indicating whether the user triggered an event.
Is it possible for the application to get access to the state of that flag via a function call - something like webContents.hasUserGesture()? If not, could we get access to it in the new-window event via an attribute, event.hasUserGesture ?
(I can make a PR if somebody can assure me this is doable, and point to relevant APIs.)
The text was updated successfully, but these errors were encountered:
Knowing whether the user initiated the
new-window
event is important for blocking unwanted popups in a webview. Without it, an untrusted page can callwindow.open()
oranchorTag.click()
to trigger popups at will.In
webContents.executeJavascript
, we have auserGesture
parameter which overrides the flag indicating whether the user triggered an event.Is it possible for the application to get access to the state of that flag via a function call - something like
webContents.hasUserGesture()
? If not, could we get access to it in thenew-window
event via an attribute,event.hasUserGesture
?(I can make a PR if somebody can assure me this is doable, and point to relevant APIs.)
The text was updated successfully, but these errors were encountered: