Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jkleinsc committed May 18, 2023
1 parent 2c79cb0 commit 3dd23b9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/api/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,17 @@ app.whenReady().then(() => {
* `video`
* `wireless`
Sets the handler which can be used to override which USB classes are protected.
Sets the handler which can be used to override which [USB classes are protected](https://wicg.github.io/webusb/#usbinterface-interface).
The return value for the handler is a string array of USB classes which should be considered protected (eg not available in the renderer). Valid values for the array are:
* `audio`
* `audio_video`
* `hid`
* `mass_storage`
* `smart_card`
* `video`
* `wireless`
Returning an empty string array from the handler will allow all USB classes; returning the passed in array will maintain the default list of protected USB classes (this is also the default behavior if a handler is not defined).
To clear the handler, call `setUSBProtectedClassesHandler(null)`.
Expand Down

0 comments on commit 3dd23b9

Please sign in to comment.