test: remove a bunch of usage of the remote module (#21119)
This commit is contained in:
parent
4f1536479e
commit
26ecf63ab4
22 changed files with 124 additions and 125 deletions
2
spec/fixtures/api/beforeunload-false.html
vendored
2
spec/fixtures/api/beforeunload-false.html
vendored
|
@ -5,7 +5,7 @@
|
|||
var unloadPrevented = false;
|
||||
window.onbeforeunload = function() {
|
||||
setTimeout(function() {
|
||||
require('electron').remote.getCurrentWindow().emit('onbeforeunload');
|
||||
require('electron').ipcRenderer.sendSync('onbeforeunload');
|
||||
}, 0);
|
||||
if (!unloadPrevented) {
|
||||
unloadPrevented = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue