2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-12-23 10:38:55 +00:00

Implement electron API changes for requiring module as per http://blog.atom.io/2015/11/17/electron-api-changes.html

This commit is contained in:
Jia Hao 2016-01-19 11:28:04 +08:00
parent 63df4f0283
commit fb4a99a872
2 changed files with 7 additions and 7 deletions

View File

@ -2,12 +2,10 @@
* Created by JiaHao on 5/7/15.
*/
var ipc = require('ipc');
ipc.on('params', function(message) {
var ipc = require('electron').ipcRenderer;
ipc.on('params', function(event, message) {
var appArgs = JSON.parse(message);
console.log(appArgs);
document.title = appArgs.name;
var webView = document.createElement('webview');

View File

@ -2,10 +2,12 @@
* Created by JiaHao on 4/7/15.
*/
var app = require('app');
var fs = require('fs');
var BrowserWindow = require('browser-window');
var ipc = require('ipc');
var electron = require('electron');
var app = electron.app;
var BrowserWindow = electron.BrowserWindow;
var ipc = electron.ipcMain;
const APP_ARGS_FILE_PATH = __dirname + '/targetUrl.txt';
require('crash-reporter').start();