electron/docs/fiddles/features/web-bluetooth/preload.js
Shmuel Leider ff0517be3e
docs: update bluetooth fiddle example event name to trigger correct event (#35894)
* Fix event type spelling for bluetooth fiddle example

* docs: Fix event type spelling for bluetooth documentation fiddle example
2022-10-04 15:31:02 -04:00

6 lines
No EOL
306 B
JavaScript

const { contextBridge, ipcRenderer } = require('electron')
contextBridge.exposeInMainWorld('electronAPI', {
bluetoothPairingRequest: (callback) => ipcRenderer.on('bluetooth-pairing-request', callback),
bluetoothPairingResponse: (response) => ipcRenderer.send('bluetooth-pairing-response', response)
})