electron/spec/fixtures/api/isolated-fetch-preload.js
2020-03-20 13:28:31 -07:00

6 lines
203 B
JavaScript

const { ipcRenderer } = require('electron');
// Ensure fetch works from isolated world origin
fetch('https://localhost:1234').catch(err => {
ipcRenderer.send('isolated-fetch-error', err.message);
});