久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何啟用電子身份驗證彈出窗口?

How to enable a pop up for authentication for electron?(如何啟用電子身份驗證彈出窗口?)
本文介紹了如何啟用電子身份驗證彈出窗口?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在創建一個訪問 url 的電子應用程序.當導航到 URL 時,用戶單擊按鈕并被重定向到在 Chrome 中顯示此彈出窗口的 URL.

I am creating an electron app that accesses a url. And when navigated to the URL the user clicks on a button and are redirected to a URL that displays this pop up in Chrome.

如何在電子中啟用/顯示此彈出窗口?默認情況下似乎沒有啟用它.

How can I enable/show this popup in electron? It doesn't seem to enable it by default.

推薦答案

你在圖片上看到的是Chrome打開了一個處理身份驗證事件的彈出窗口.

What you see on the picture is that Chrome opens a popup for handle authentication event.

但是,Electron 默認情況下不會彈出這樣的彈出窗口,正如 'login' 事件

However, Electron doesn't make such popup by default, as it stated in the documentation of 'login' event

默認行為是取消所有身份驗證,要覆蓋它,您應該使用 event.preventDefault() 阻止默認行為并調用 callback(username, password)憑據.

The default behavior is to cancel all authentications, to override this you should prevent the default behavior with event.preventDefault() and call callback(username, password) with the credentials.

這意味著,您應該處理 'login' 您的 webContents 的事件 手動打開一個彈出窗口或做任何你想做的事情.

This means, you should handle 'login' event of your webContents manually and open a popup window by yourself or do whatever you want.

這篇關于如何啟用電子身份驗證彈出窗口?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How to fix BrowserWindow is not a constructor error when creating child window in Electron renderer process(在 Electron 渲染器進程中創建子窗口時如何修復 BrowserWindow 不是構造函數錯誤) - IT屋-程序員軟件開發技術
mainWindow.loadURL(quot;https://localhost:3000/quot;) show white screen on Electron app(mainWindow.loadURL(https://localhost:3000/) 在 Electron 應用程序上顯示白屏)
Electron webContents executeJavaScript : Cannot execute script on second on loadURL(Electron webContents executeJavaScript:無法在第二個 loadURL 上執行腳本)
how to use electron browser window inside components in angular-cli?(如何在angular-cli的組件內使用電子瀏覽器窗口?)
ElectronJS - sharing redux store between windows?(ElectronJS - 在 Windows 之間共享 redux 存儲?)
How to access camera/webcamera inside electron app?(如何在電子應用程序中訪問相機/網絡攝像頭?)
主站蜘蛛池模板: 91免费福利视频 | 成人欧美视频 | 日韩在线观看 | 天天射天天 | 日韩免费精品视频 | 日韩一区二区三区视频 | 日韩久久久久 | 天天射影院| 中文字幕黄色 | 欧美日韩在线看 | 亚洲在线 | 国产乱码一区二区 | 在线一区视频 | 亚洲在线免费观看 | 日韩视频在线观看免费 | 天天操夜| 日日夜夜狠狠 | 日韩欧美一级 | 大桥未久在线视频 | 午夜激情福利视频 | 亚洲精品网站在线观看 | 国产一区二三区 | 久久在线精品 | 国产一级片免费看 | 亚洲午夜18毛片在线看 | 国产免费一区 | 成人黄色小视频 | 日本成人免费 | 色福利网 | 中文在线免费观看 | 亚洲第一免费视频 | 亚洲精品免费在线 | 一区二区三区精品 | 国产乡下妇女做爰视频 | 免费性视频 | 国产精品一品二区三区的使用体验 | 午夜视频网 | 玖玖精品视频 | 国产美女自拍视频 | av黄色片 | 亚洲在线免费视频 |