use loadURL since loadUrl is deprecated

This commit is contained in:
Howard.Zuo 2015-11-18 09:37:45 +08:00
parent ab54fedc9a
commit c2eddb20f7
5 changed files with 13 additions and 13 deletions

View file

@ -94,7 +94,7 @@ app.on('ready', function() {
mainWindow = new BrowserWindow({width: 800, height: 600}); mainWindow = new BrowserWindow({width: 800, height: 600});
// cargar el index.html de nuestra aplicación. // cargar el index.html de nuestra aplicación.
mainWindow.loadUrl('file://' + __dirname + '/index.html'); mainWindow.loadURL('file://' + __dirname + '/index.html');
// Desplegar devtools. // Desplegar devtools.
mainWindow.openDevTools(); mainWindow.openDevTools();

View file

@ -74,7 +74,7 @@ app.on('ready', function() {
mainWindow = new BrowserWindow({width: 800, height: 600}); mainWindow = new BrowserWindow({width: 800, height: 600});
// and load the index.html of the app. // and load the index.html of the app.
mainWindow.loadUrl('file://' + __dirname + '/index.html'); mainWindow.loadURL('file://' + __dirname + '/index.html');
// Open the devtools. // Open the devtools.
mainWindow.openDevTools(); mainWindow.openDevTools();

View file

@ -106,7 +106,7 @@ app.on('ready', function() {
mainWindow = new BrowserWindow({width: 800, height: 600}); mainWindow = new BrowserWindow({width: 800, height: 600});
// e carrega o index.html do app. // e carrega o index.html do app.
mainWindow.loadUrl('file://' + __dirname + '/index.html'); mainWindow.loadURL('file://' + __dirname + '/index.html');
// Abre os DevTools. // Abre os DevTools.
mainWindow.openDevTools(); mainWindow.openDevTools();

View file

@ -68,7 +68,7 @@ app.on('ready', function() {
mainWindow = new BrowserWindow({width: 800, height: 600}); mainWindow = new BrowserWindow({width: 800, height: 600});
// 加载应用的 index.html // 加载应用的 index.html
mainWindow.loadUrl('file://' + __dirname + '/index.html'); mainWindow.loadURL('file://' + __dirname + '/index.html');
// 打开开发工具 // 打开开发工具
mainWindow.openDevTools(); mainWindow.openDevTools();

View file

@ -85,7 +85,7 @@ app.on('ready', function() {
  mainWindow = new BrowserWindow({width: 800, height: 600});   mainWindow = new BrowserWindow({width: 800, height: 600});
  // 載入應用程式的 index.html   // 載入應用程式的 index.html
  mainWindow.loadUrl('file://' + __dirname + '/index.html');   mainWindow.loadURL('file://' + __dirname + '/index.html');
  // 打開開發者工具   // 打開開發者工具
  mainWindow.webContents.openDevTools();   mainWindow.webContents.openDevTools();