mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-09-22 09:39:02 +00:00
Implemented opening of links in new window
This commit is contained in:
parent
4b34cf1ffb
commit
46bb14ac2a
@ -18,6 +18,10 @@ ipc.on('params', function(message) {
|
||||
webView.setAttribute('minwidth', '600');
|
||||
webView.setAttribute('minheight', '800');
|
||||
|
||||
webView.addEventListener('new-window', function(e) {
|
||||
require('shell').openExternal(e.url);
|
||||
});
|
||||
|
||||
var webViewDiv = document.getElementById('webViewDiv');
|
||||
webViewDiv.appendChild(webView);
|
||||
|
||||
@ -45,5 +49,8 @@ ipc.on('params', function(message) {
|
||||
var webView = document.getElementById('webView');
|
||||
webView.undo();
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
@ -31,7 +31,7 @@ app.on('ready', function() {
|
||||
);
|
||||
mainWindow.loadUrl('file://' + __dirname + '/index.html');
|
||||
|
||||
mainWindow.openDevTools();
|
||||
//mainWindow.openDevTools();
|
||||
mainWindow.webContents.on('did-finish-load', function() {
|
||||
fs.readFile(APP_ARGS_FILE_PATH, 'utf8', function (error, data) {
|
||||
if (error) {
|
||||
|
Loading…
Reference in New Issue
Block a user