15 lines
488 B
JavaScript
15 lines
488 B
JavaScript
const { ipcRenderer } = require('electron')
|
|
|
|
document.addEventListener('DOMContentLoaded', (event) => {
|
|
const outerFrame = document.querySelector('#outer-frame')
|
|
if (outerFrame) {
|
|
outerFrame.onload = function () {
|
|
const pdframe = outerFrame.contentWindow.document.getElementById('pdf-frame')
|
|
if (pdframe) {
|
|
pdframe.contentWindow.addEventListener('pdf-loaded', (event) => {
|
|
ipcRenderer.send('pdf-loaded', event.detail)
|
|
})
|
|
}
|
|
}
|
|
}
|
|
})
|