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
6
spec/fixtures/pages/basic-auth.html
vendored
6
spec/fixtures/pages/basic-auth.html
vendored
|
@ -2,7 +2,7 @@
|
|||
<body>
|
||||
<script src="../../static/jquery-2.0.3.min.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var ipc = require('ipc-renderer');
|
||||
var ipcRenderer = require('electron').ipcRenderer;
|
||||
var port = location.search.substr("?port=".length);
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
|
@ -11,10 +11,10 @@
|
|||
"Authorization": "Basic " + btoa("test:test")
|
||||
},
|
||||
success: function(result) {
|
||||
ipc.sendToHost(result);
|
||||
ipcRenderer.sendToHost(result);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
ipc.sendToHost(error);
|
||||
ipcRenderer.sendToHost(error);
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue