From 14d7f0c8b5e9c3d4935f02210af9e30e724186ef Mon Sep 17 00:00:00 2001 From: Quang Lam Date: Wed, 19 Apr 2023 15:02:44 -0400 Subject: [PATCH 1/2] Fix 'usb-device-added', 'usb-device-removed', 'usb-device-revoked' typings --- docs/api/session.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/docs/api/session.md b/docs/api/session.md index 80a6ec369bc12..1d65c07965969 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -519,9 +519,7 @@ app.whenReady().then(() => { Returns: * `event` Event -* `details` Object - * `device` [USBDevice](structures/usb-device.md) - * `frame` [WebFrameMain](web-frame-main.md) +* `device` [USBDevice](structures/usb-device.md) Emitted after `navigator.usb.requestDevice` has been called and `select-usb-device` has fired if a new device becomes available before @@ -534,9 +532,7 @@ with the newly added device. Returns: * `event` Event -* `details` Object - * `device` [USBDevice](structures/usb-device.md) - * `frame` [WebFrameMain](web-frame-main.md) +* `device` [USBDevice](structures/usb-device.md) Emitted after `navigator.usb.requestDevice` has been called and `select-usb-device` has fired if a device has been removed before the callback @@ -550,7 +546,7 @@ Returns: * `event` Event * `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. Emitted after `USBDevice.forget()` has been called. This event can be used From 842ade8c2f389412d77f6223845c78f77def57e9 Mon Sep 17 00:00:00 2001 From: Quang Lam Date: Thu, 20 Apr 2023 08:57:06 -0400 Subject: [PATCH 2/2] Add webContents --- docs/api/session.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/api/session.md b/docs/api/session.md index 1d65c07965969..18e976c0c972b 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -520,6 +520,7 @@ Returns: * `event` Event * `device` [USBDevice](structures/usb-device.md) +* `webContents` [WebContents](web-contents.md) Emitted after `navigator.usb.requestDevice` has been called and `select-usb-device` has fired if a new device becomes available before @@ -533,6 +534,7 @@ Returns: * `event` Event * `device` [USBDevice](structures/usb-device.md) +* `webContents` [WebContents](web-contents.md) Emitted after `navigator.usb.requestDevice` has been called and `select-usb-device` has fired if a device has been removed before the callback