Skip to content

Commit

Permalink
Fix convertHtmlStringToPdfBlob electron only script registering
Browse files Browse the repository at this point in the history
  • Loading branch information
Rokt33r committed Dec 4, 2020
1 parent b2ae54a commit 16a3e43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion static/main-preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
function convertHtmlStringToPdfBlob(htmlString, printOptions) {
return new Promise((resolve, reject) => {
const encodedStr = encodeURIComponent(htmlString)
const { BrowserWindow } = remote
const { BrowserWindow } = electron.remote
const windowOptions = {
webPreferences: {
nodeIntegration: false,
Expand Down Expand Up @@ -215,4 +215,5 @@
window.__ELECTRON_ONLY__.isDefaultProtocolClient = isDefaultProtocolClient
window.__ELECTRON_ONLY__.getWebContentsById
window.__ELECTRON_ONLY__.setTrafficLightPosition = setTrafficLightPosition
window.__ELECTRON_ONLY__.convertHtmlStringToPdfBlob = convertHtmlStringToPdfBlob
})()

0 comments on commit 16a3e43

Please sign in to comment.