electron/spec-main/fixtures/api/context-bridge/can-bind-preload.js
2020-03-20 13:28:31 -07:00

13 lines
253 B
JavaScript

const { contextBridge, ipcRenderer } = require('electron');
console.info(contextBridge);
let bound = false;
try {
contextBridge.exposeInMainWorld('test', {});
bound = true;
} catch {
// Ignore
}
ipcRenderer.send('context-bridge-bound', bound);