electron/spec/fixtures/api/isolated-fetch-preload.js

7 lines
203 B
JavaScript
Raw Normal View History

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