docs: fix 'usb-device-added', 'usb-device-removed', 'usb-device-revoked' typings (#38035)

* Fix 'usb-device-added', 'usb-device-removed', 'usb-device-revoked' typings

* Add webContents
This commit is contained in:
Quang Lam 2023-04-23 16:16:38 -04:00 коммит произвёл GitHub
Родитель 964934c161
Коммит b626be5e33
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 5 добавлений и 7 удалений

Просмотреть файл

@ -519,9 +519,8 @@ app.whenReady().then(() => {
Returns: Returns:
* `event` Event * `event` Event
* `details` Object * `device` [USBDevice](structures/usb-device.md)
* `device` [USBDevice](structures/usb-device.md) * `webContents` [WebContents](web-contents.md)
* `frame` [WebFrameMain](web-frame-main.md)
Emitted after `navigator.usb.requestDevice` has been called and Emitted after `navigator.usb.requestDevice` has been called and
`select-usb-device` has fired if a new device becomes available before `select-usb-device` has fired if a new device becomes available before
@ -534,9 +533,8 @@ with the newly added device.
Returns: Returns:
* `event` Event * `event` Event
* `details` Object * `device` [USBDevice](structures/usb-device.md)
* `device` [USBDevice](structures/usb-device.md) * `webContents` [WebContents](web-contents.md)
* `frame` [WebFrameMain](web-frame-main.md)
Emitted after `navigator.usb.requestDevice` has been called and Emitted after `navigator.usb.requestDevice` has been called and
`select-usb-device` has fired if a device has been removed before the callback `select-usb-device` has fired if a device has been removed before the callback
@ -550,7 +548,7 @@ Returns:
* `event` Event * `event` Event
* `details` Object * `details` Object
* `device` [USBDevice[]](structures/usb-device.md) * `device` [USBDevice](structures/usb-device.md)
* `origin` string (optional) - The origin that the device has been revoked from. * `origin` string (optional) - The origin that the device has been revoked from.
Emitted after `USBDevice.forget()` has been called. This event can be used Emitted after `USBDevice.forget()` has been called. This event can be used