<script> const ipcRenderer = require('electron').ipcRenderer; caches.open('foo').then( () => ipcRenderer.send('success'), err => ipcRenderer.send('failure', err) ) </script>