Skip to content

Commit 430b5dc

Browse files
committed
revert variable cleanup - not needed
1 parent dfa4084 commit 430b5dc

File tree

1 file changed

+2
-3
lines changed
  • resources/js/electron-plugin/src/preload

1 file changed

+2
-3
lines changed

resources/js/electron-plugin/src/preload/index.mts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ ipcRenderer.on('native-event', (event, data) => {
9191
// -------------------------------------------------------------------
9292
// Let the client know preload is fully evaluated
9393
// -------------------------------------------------------------------
94-
contextBridge.exposeInMainWorld('_native_init', (function() {
94+
contextBridge.exposeInMainWorld('native:initialized', (function() {
9595
// This is admittedly a bit hacky. Due to context isolation
9696
// we don't have direct access to the renderer window object,
9797
// but by assigning a bridge function that executes itself inside
@@ -105,6 +105,5 @@ contextBridge.exposeInMainWorld('_native_init', (function() {
105105

106106
window.dispatchEvent(new CustomEvent('native:init'));
107107

108-
// Cleanup the window property we abused
109-
delete window['_native_init'];
108+
return true;
110109
})())

0 commit comments

Comments
 (0)