docs: fix typing of session.setDevicePermissionHandler (#38188)
This commit is contained in:
parent
f8d534f33e
commit
a7adbae543
2 changed files with 2 additions and 2 deletions
|
@ -1024,7 +1024,7 @@ Passing `null` instead of a function resets the handler to its default state.
|
||||||
* `details` Object
|
* `details` Object
|
||||||
* `deviceType` string - The type of device that permission is being requested on, can be `hid`, `serial`, or `usb`.
|
* `deviceType` string - The type of device that permission is being requested on, can be `hid`, `serial`, or `usb`.
|
||||||
* `origin` string - The origin URL of the device permission check.
|
* `origin` string - The origin URL of the device permission check.
|
||||||
* `device` [HIDDevice](structures/hid-device.md) | [SerialPort](structures/serial-port.md)- the device that permission is being requested for.
|
* `device` [HIDDevice](structures/hid-device.md) | [SerialPort](structures/serial-port.md) | [USBDevice](structures/usb-device.md) - the device that permission is being requested for.
|
||||||
|
|
||||||
Sets the handler which can be used to respond to device permission checks for the `session`.
|
Sets the handler which can be used to respond to device permission checks for the `session`.
|
||||||
Returning `true` will allow the device to be permitted and `false` will reject it.
|
Returning `true` will allow the device to be permitted and `false` will reject it.
|
||||||
|
|
|
@ -129,7 +129,7 @@ Electron provides several APIs for working with the WebUSB API:
|
||||||
when handling the `select-usb-device` event.
|
when handling the `select-usb-device` event.
|
||||||
**Note:** These two events only fire until the callback from `select-usb-device`
|
**Note:** These two events only fire until the callback from `select-usb-device`
|
||||||
is called. They are not intended to be used as a generic usb device listener.
|
is called. They are not intended to be used as a generic usb device listener.
|
||||||
* The [`usb-device-revoked' event on the Session](../api/session.md#event-usb-device-revoked) can
|
* The [`usb-device-revoked` event on the Session](../api/session.md#event-usb-device-revoked) can
|
||||||
be used to respond when [device.forget()](https://developer.chrome.com/articles/usb/#revoke-access)
|
be used to respond when [device.forget()](https://developer.chrome.com/articles/usb/#revoke-access)
|
||||||
is called on a USB device.
|
is called on a USB device.
|
||||||
* [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
|
* [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
|
||||||
|
|
Loading…
Reference in a new issue