2018-09-13 16:10:51 +00:00
|
|
|
const { ipcRenderer } = require('electron');
|
2017-10-19 14:15:02 +00:00
|
|
|
|
2017-11-13 20:13:19 +00:00
|
|
|
document.addEventListener('DOMContentLoaded', (event) => {
|
2018-09-28 23:17:00 +00:00
|
|
|
const subframe = document.querySelector('#pdf-frame');
|
2017-10-19 14:15:02 +00:00
|
|
|
if (subframe) {
|
2017-11-13 20:13:19 +00:00
|
|
|
subframe.contentWindow.addEventListener('pdf-loaded', (event) => {
|
2017-10-20 06:46:41 +00:00
|
|
|
ipcRenderer.send('pdf-loaded', event.detail);
|
|
|
|
});
|
2017-10-19 14:15:02 +00:00
|
|
|
}
|
2017-10-20 06:46:41 +00:00
|
|
|
});
|