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
{{ message }}
Repository navigation
How to catch alert is open to close it or disable alert function on iframe? #10569
const{app, BrowserWindow}=require('electron')functioncreateWindow(){mainWindow=newBrowserWindow({width: 800,height: 600});mainWindow.loadURL("https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_alert");}app.on('ready',()=>{createWindow();})// Quit when all windows are closed.app.on('window-all-closed',()=>{// On macOS it is common for applications and their menu bar// to stay active until the user quits explicitly with Cmd + Qif(process.platform!=='darwin'){app.quit()}})
And the result when i click "Try it":
And how to catch alert is open to close it or another way to disable alert function in iframe?
Hey there, this doesn't appear to be an issue so much as a question about how to implement your desired functionality; have you tried asking this question in the slack rooms or other electron forums?
It is an issue.
I try to using preload to disable function alert in mainFrame, it worked
And when i try a page with iframe have alert function, the preload not worked.
Thank you for taking the time to report this issue and helping to make Electron better.
The version of Electron you reported this on has been superseded by newer releases.
If you're still experiencing this issue in Electron v2.0.x or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.
I'm setting the blocked/need-info label for the above reasons.
We haven't gotten a response to our questions in our comment above. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.
Activity
codebytere commentedon Sep 22, 2017
Hey there, this doesn't appear to be an issue so much as a question about how to implement your desired functionality; have you tried asking this question in the slack rooms or other electron forums?
phanthai12 commentedon Sep 24, 2017
It is an issue.
I try to using
preloadto disable function alert inmainFrame, it workedAnd when i try a page with
iframehavealertfunction, thepreloadnot worked.So, is this a issue?
codebytere commentedon Sep 24, 2017
Ah, i misunderstood your question. Yes, and i'll try to take a look soon!
sofianguy commentedon Jan 7, 2019
Thank you for taking the time to report this issue and helping to make Electron better.
The version of Electron you reported this on has been superseded by newer releases.
If you're still experiencing this issue in Electron v2.0.x or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know.
I'm setting the
blocked/need-infolabel for the above reasons.Thanks in advance! Your help is appreciated.
sofianguy commentedon Jan 15, 2019
Thank you for your issue!
We haven't gotten a response to our questions in our comment above. With only the information that is currently in the issue, we don't have enough information to take action. I'm going to close this but don't hesitate to reach out if you have or find the answers we need, we'll be happy to reopen the issue.
feat: add support for node / preloads in subframes
feat: add support for node / preloads in subframes
feat: preloads and nodeIntegration in iframes (#16425)
feat: preloads and nodeIntegration in iframes (#16425)
feat: preloads and nodeIntegration in iframes (#16425)