fix: ensure bluetooth devices are not returned by default (#32178)
This commit is contained in:
parent
1facbb4a09
commit
a11f5cbb27
2 changed files with 10 additions and 0 deletions
|
@ -749,6 +749,14 @@ WebContents.prototype._init = function () {
|
|||
}
|
||||
});
|
||||
|
||||
this.on('select-bluetooth-device', (event, devices, callback) => {
|
||||
if (this.listenerCount('select-bluetooth-device') === 0) {
|
||||
// Cancel it if there are no handlers
|
||||
event.preventDefault();
|
||||
callback('');
|
||||
}
|
||||
});
|
||||
|
||||
const event = process._linkedBinding('electron_browser_event').createEmpty();
|
||||
app.emit('web-contents-created', event, this);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue