Skip to content

Commit

Permalink
docs: fixup WebUSB fiddle (#37754)
Browse files Browse the repository at this point in the history
docs: fixup WebUSB fiddle (#37455)

docs: fixup webusb fiddle
(cherry picked from commit 0d3aee2)
  • Loading branch information
jkleinsc committed Mar 30, 2023
1 parent dc7a49b commit 5c51515
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions docs/fiddles/features/web-usb/main.js
@@ -1,5 +1,4 @@
const {app, BrowserWindow} = require('electron')
const e = require('express')
const path = require('path')

function createWindow () {
Expand Down Expand Up @@ -44,7 +43,6 @@ function createWindow () {
}
})


mainWindow.webContents.session.setDevicePermissionHandler((details) => {
if (details.deviceType === 'usb' && details.origin === 'file://') {
if (!grantedDeviceThroughPermHandler) {
Expand Down
2 changes: 1 addition & 1 deletion docs/fiddles/features/web-usb/renderer.js
@@ -1,5 +1,5 @@
function getDeviceDetails(device) {
return grantedDevice.productName || `Unknown device ${grantedDevice.deviceId}`
return device.productName || `Unknown device ${device.deviceId}`
}

async function testIt() {
Expand Down

0 comments on commit 5c51515

Please sign in to comment.