Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fixup WebUSB fiddle #37525

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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