Skip to content

Commit

Permalink
docs: fix typescript error in code samples (#35641)
Browse files Browse the repository at this point in the history
Fixed typescript error
  • Loading branch information
leonschwanitz committed Sep 13, 2022
1 parent 71ba841 commit 200153d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/fiddles/features/web-serial/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ function createWindow () {
if (permission === 'serial' && details.securityOrigin === 'file:///') {
return true
}

return false
})

mainWindow.webContents.session.setDevicePermissionHandler((details) => {
if (details.deviceType === 'serial' && details.origin === 'file://') {
return true
}

return false
})

mainWindow.loadFile('index.html')
Expand Down

0 comments on commit 200153d

Please sign in to comment.