mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: add USB protected classes handler (#38493)
* feat: add USB protected classes handler Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * chore: apply review suggestions Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * chore: update docs Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * chore: apply review suggestions Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * update doc per suggestion Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
@@ -142,6 +142,8 @@ Electron provides several APIs for working with the WebUSB API:
|
||||
`setDevicePermissionHandler`.
|
||||
* [`ses.setPermissionCheckHandler(handler)`](../api/session.md#sessetpermissioncheckhandlerhandler)
|
||||
can be used to disable USB access for specific origins.
|
||||
* [`ses.setUSBProtectedClassesHandler](../api/session.md#sessetusbprotectedclasseshandlerhandler)
|
||||
can be used to allow usage of [protected USB classes](https://wicg.github.io/webusb/#usbinterface-interface) that are not available by default.
|
||||
|
||||
### Example
|
||||
|
||||
|
||||
Reference in New Issue
Block a user