Use require('electron') in Electron's code
This commit is contained in:
parent
f9d7e7ce55
commit
1d1f911b09
71 changed files with 265 additions and 250 deletions
|
@ -3,7 +3,7 @@
|
|||
<script type="text/javascript" charset="utf-8">
|
||||
window.onbeforeunload = function() {
|
||||
setTimeout(function() {
|
||||
require('remote').getCurrentWindow().emit('onbeforeunload');
|
||||
require('electron').remote.getCurrentWindow().emit('onbeforeunload');
|
||||
}, 0);
|
||||
return '';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue