fix: implement 'login' event for WebContents (#20954)

This commit is contained in:
Jeremy Apthorp 2019-11-11 09:47:01 -08:00 committed by GitHub
parent 049bd09150
commit 034f4d5734
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 239 additions and 247 deletions

View file

@ -314,10 +314,8 @@ Returns:
* `event` Event
* `webContents` [WebContents](web-contents.md)
* `request` Object
* `method` String
* `authenticationResponseDetails` Object
* `url` URL
* `referrer` URL
* `authInfo` Object
* `isProxy` Boolean
* `scheme` String
@ -337,7 +335,7 @@ should prevent the default behavior with `event.preventDefault()` and call
```javascript
const { app } = require('electron')
app.on('login', (event, webContents, request, authInfo, callback) => {
app.on('login', (event, webContents, details, authInfo, callback) => {
event.preventDefault()
callback('username', 'secret')
})

View file

@ -454,10 +454,8 @@ The usage is the same with [the `select-client-certificate` event of
Returns:
* `event` Event
* `request` Object
* `method` String
* `authenticationResponseDetails` Object
* `url` URL
* `referrer` URL
* `authInfo` Object
* `isProxy` Boolean
* `scheme` String