mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-14 23:09:46 -04:00
Expose __dirname in userland
This commit is contained in:
parent
988095fde5
commit
8b5763f9f8
@ -39,6 +39,7 @@ contextBridge.exposeInMainWorld('electronAPI', {
|
|||||||
ipcRenderer.send('open-external', url);
|
ipcRenderer.send('open-external', url);
|
||||||
},
|
},
|
||||||
isMicrosoftStoreApp: process.windowsStore && regexpInstalledFromMicrosoftStore.test(__dirname),
|
isMicrosoftStoreApp: process.windowsStore && regexpInstalledFromMicrosoftStore.test(__dirname),
|
||||||
|
__dirname: __dirname,
|
||||||
on: function (event, callback) {
|
on: function (event, callback) {
|
||||||
ipcRenderer.on(event, function (_, data1, data2) {
|
ipcRenderer.on(event, function (_, data1, data2) {
|
||||||
callback(data1, data2);
|
callback(data1, data2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user